Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Maciej Izak
2017-08-29 22:09 GMT+02:00 Ondrej Pokorny : > I, on the contrary, read: > > On 29.08.2017 18:54, Sven Barth via fpc-devel wrote: > > (btw: a type helper for a primitive type can inherit from a record > helper of the same type, internally they're all the same) > but in this

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Ondrej Pokorny
On 29.08.2017 22:06, Michael Van Canneyt wrote: And actually, duplication of effort has a good side: in a way, the IDE independently 'checks' the working of the compiler. Unfortunately the reality is the other way round: the compiler checks the working of CodeTools :) Positive is that

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Ondrej Pokorny
On 29.08.2017 21:50, Maciej Izak wrote: 2017-08-29 20:24 GMT+02:00 Ondrej Pokorny >: No - please not yet another undefined behavior :) It's perfectly defined: disabled without typehelpers, enabled with typehelpers. but in the case of

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Michael Van Canneyt
On Tue, 29 Aug 2017, Maciej Izak wrote: 2017-08-29 17:51 GMT+02:00 Ondrej Pokorny : On 29.08.2017 17:47, Anthony Walter wrote: Out of curiosity, is there any strategy that is or can be employed to ensure new language features and mode switches automatically work with

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Maciej Izak
2017-08-29 17:51 GMT+02:00 Ondrej Pokorny : > On 29.08.2017 17:47, Anthony Walter wrote: > > Out of curiosity, is there any strategy that is or can be employed to > ensure new language features and mode switches automatically work with > codetools and by extension the Lazarus

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Maciej Izak
2017-08-29 20:24 GMT+02:00 Ondrej Pokorny : > No - please not yet another undefined behavior :) > > It's perfectly defined: disabled without typehelpers, enabled with > typehelpers. > but in the case of strictly defined rules we must to do as Sven said: "Namely that it

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Ondrej Pokorny
On 29.08.2017 20:20, Maciej Izak wrote: IMO inheritance for record helpers in Delphi mode has no really meaning and may stay as undefined behavior No - please not yet another undefined behavior :) It's perfectly defined: disabled without typehelpers, enabled with typehelpers. Ondrej

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Maciej Izak
2017-08-29 18:54 GMT+02:00 Sven Barth via fpc-devel < fpc-devel@lists.freepascal.org>: > Maybe it would indeed make more sense to adjust the meaning of the > typehelpers modeswitch in mode Delphi... Namely that it enabled the "type > helper" syntax including the inheritance. But the record

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Ondrej Pokorny
On 29.08.2017 18:54, Sven Barth via fpc-devel wrote: Am 29.08.2017 17:39 schrieb "Ondrej Pokorny" >: > So yes, your description of {$modeswitch typehelpers} makes sense for 3.0.0 but not for trunk any more. So what is your intention - 3.0.0

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Sven Barth via fpc-devel
Am 29.08.2017 17:39 schrieb "Ondrej Pokorny" : > So yes, your description of {$modeswitch typehelpers} makes sense for 3.0.0 but not for trunk any more. So what is your intention - 3.0.0 behavior or trunk behavior? Maybe it would indeed make more sense to adjust the meaning of

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Ondrej Pokorny
On 29.08.2017 17:47, Anthony Walter wrote: Out of curiosity, is there any strategy that is or can be employed to ensure new language features and mode switches automatically work with codetools and by extension the Lazarus IDE? Or is duplication of effort the only way to get codetools

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Anthony Walter
Out of curiosity, is there any strategy that is or can be employed to ensure new language features and mode switches automatically work with codetools and by extension the Lazarus IDE? Or is duplication of effort the only way to get codetools properly parsing new language features?

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Ondrej Pokorny
There is a difference between FPC 3.0.0 and current trunk (without my patch) regarding {$modeswitch typehelpers} and "TXYZHelper = type helper for TXYZ". In 3.0.0 it is obvious - it can be used only for primitive types. In trunk you can use type helper for everything (with {$modeswitch

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Sven Barth via fpc-devel
Am 29.08.2017 12:44 schrieb "Ondrej Pokorny" : > > On 29.08.2017 11:48, Sven Barth via fpc-devel wrote: >> >> The idea is okay as well, but I'd name it RecordHelperInheritance, cause if we'd allow "type helper" in mode Delphi (as Maciej asks) then those would support inheritance

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Ondrej Pokorny
On 29.08.2017 12:44, Ondrej Pokorny wrote: {$modeswitch advancedrecords-} // it doesn't disable record helper for TRec Sorry, typo: "it disables record helper for TRec ". Ondrej ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Ondrej Pokorny
On 29.08.2017 11:48, Sven Barth via fpc-devel wrote: The idea is okay as well, but I'd name it RecordHelperInheritance, cause if we'd allow "type helper" in mode Delphi (as Maciej asks) then those would support inheritance by default as they aren't Delphi compatible as a whole anyway.

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Sven Barth via fpc-devel
Am 29.08.2017 10:37 schrieb "Ondrej Pokorny" : > > On 29.08.2017 8:47, Michael Van Canneyt wrote: >> >> On Tue, 29 Aug 2017, Sven Barth via fpc-devel wrote: >> >>> Suggested name is "NonDelphiExtensions". >> >> >> Why not simply allow $RECORDHELPERS or so ? > > > Hmm yes.

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Sven Barth via fpc-devel
Am 29.08.2017 08:47 schrieb "Michael Van Canneyt" : > > > > On Tue, 29 Aug 2017, Sven Barth via fpc-devel wrote: > >> Am 28.08.2017 23:11 schrieb "Ondrej Pokorny" : >>> >>> >>> Hello! >>> >>> I find it unnecessary to disable record helper inheritance in

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Ondrej Pokorny
On 29.08.2017 10:43, Maciej Izak wrote: I prefer to have also "type helper for" also in Dlephi mode instead of "record helper for" for simple types. Different syntax for the same thing is very annoying especially when someone need to work in many modes. -,- I don't care about the syntax that

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Maciej Izak
2017-08-29 10:37 GMT+02:00 Ondrej Pokorny : > Hmm yes. Reading https://www.freepascal.org/doc > s-html/3.0.2/prog/progsu105.html you can define other non-delphi > extensions for the Delphi mode (like NESTEDCOMMENTS). > > Maybe it would be more clear to name the modeswitch

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Ondrej Pokorny
On 29.08.2017 8:47, Michael Van Canneyt wrote: On Tue, 29 Aug 2017, Sven Barth via fpc-devel wrote: Suggested name is "NonDelphiExtensions". Why not simply allow $RECORDHELPERS or so ? Hmm yes. Reading https://www.freepascal.org/docs-html/3.0.2/prog/progsu105.html you can define other

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Ondrej Pokorny
On 29.08.2017 7:54, Sven Barth via fpc-devel wrote: patches welcome. Suggested name is "NonDelphiExtensions" Good to know, thanks. Luckily it wasn't that hard: https://mantis.freepascal.org/view.php?id=32355 Ondrej ___ fpc-devel maillist -

Re: [fpc-devel] Allow record helper inheritance in Delphi mode

2017-08-29 Thread Michael Van Canneyt
On Tue, 29 Aug 2017, Sven Barth via fpc-devel wrote: Am 28.08.2017 23:11 schrieb "Ondrej Pokorny" : Hello! I find it unnecessary to disable record helper inheritance in Delphi mode. Due to this artificial limitation I have to change unit mode from Delphi to ObjFPC.