Re: [fpc-pascal] some new features to delphi prisem

2010-02-24 Thread Doug Chamberlin
On 2/24/2010 2:48 AM, Matt Emson wrote: I think an interjection at this point is required - all of this is down to personal experience, preference and style. It is what you are used to. Having done 10+ years of Pascal, yes this is very alien. Having done 5+ years of C# and C based languages,

Re: [fpc-pascal] some new features to delphi prisem

2010-02-23 Thread Johann Glaser
Hi! Am Samstag, den 20.02.2010, 19:01 +0100 schrieb Jürgen Hestermann: y := case Other of bla : 'hello'; foo : 'bye'; baz : 'adius'; end; What do you gain with this? Doesn't look much different to case Other of bla : y := 'hello'; foo :

Re: [fpc-pascal] some new features to delphi prisem

2010-02-23 Thread Jürgen Hestermann
You are looking at the wrong example! Clearly, for variable assignment you don't gain anything. But for a function argument you do! Realy? WriteLn('The value is ',(if X then 'true' else 'false'), ' at the moment.'); Well, *this* can be done much easier ;-):

Re: [fpc-pascal] some new features to delphi prisem

2010-02-23 Thread Matt Emson
Sent from my iPhone On 24 Feb 2010, at 06:10, Jürgen Hestermann juergen.hesterm...@gmx.de wrote: Well, *this* can be done much easier ;-): snip I think an interjection at this point is required - all of this is down to personal experience, preference and style. It is what you are

Re: Re[2]: [fpc-pascal] some new features to delphi prisem

2010-02-22 Thread Matt Emson
Sent from my iPhone On 21 Feb 2010, at 19:37, JoshyFun joshy...@gmail.com wrote: z := iff(a=b,1,2); But to me it looks awful and a bit of c-ism No, that is a VB-ism. A C-ism would be: z = (a==b ? 1 : 2); Which I fo tend to use myself in c# as it is a lot more convenient in some cases.

Re: [fpc-pascal] some new features to delphi prisem

2010-02-22 Thread Matt Emson
Graeme Geldenhuys wrote: Marco van de Voort wrote: It also proves that such solution external to the language is possible. That weakens the case for a language feature My point exactly! The language doesn't need such a feature because your editor of choice should be able to do that,

Re: [fpc-pascal] some new features to delphi prisem

2010-02-22 Thread Matt Emson
Marco van de Voort wrote: IMHO Prism is not even Delphi. Just recycling of the brand. Laying cards on the proverbial table, I don't think it was ever intended to be Delphi. RemObjects developed the compiler completely outside of Delphi for a number of years before the technology was

Re: [fpc-pascal] some new features to delphi prisem

2010-02-22 Thread Anthony Walter
The syntax that Prism uses is a lot cleaner in many respects - especially removing the procedure/function conundrum and using instead method. However, in other ways it is horrible and so I can also see why it is not something worth discussing further. Matt, I am no Prism fan (I prefer native

Re: [fpc-pascal] some new features to delphi prisem

2010-02-22 Thread Jonas Maebe
On 22 Feb 2010, at 14:35, Anthony Walter wrote: The syntax that Prism uses is a lot cleaner in many respects - especially removing the procedure/function conundrum and using instead method. However, in other ways it is horrible and so I can also see why it is not something worth

Re: [fpc-pascal] some new features to delphi prisem

2010-02-22 Thread Matt Emson
Jonas Maebe wrote: Maybe this discussion could be moved to the fpc-other list? It's not really directly applicable to FPC anymore. Indeed, which is why I said [..] I can also see why it is not something worth discussing further. I guess if someone was committing to developing the compiler

Re: [fpc-pascal] some new features to delphi prisem

2010-02-22 Thread Marco van de Voort
In our previous episode, Matt Emson said: It also proves that such solution external to the language is possible. That weakens the case for a language feature My point exactly! The language doesn't need such a feature because your editor of choice should be able to do that,

Re: [fpc-pascal] some new features to delphi prisem

2010-02-22 Thread Marco van de Voort
In our previous episode, Matt Emson said: Marco van de Voort wrote: IMHO Prism is not even Delphi. Just recycling of the brand. Laying cards on the proverbial table, I don't think it was ever intended to be Delphi. RemObjects developed the compiler completely outside of Delphi for a

Re: [fpc-pascal] some new features to delphi prisem

2010-02-22 Thread David Emerson
On Sat 20 Feb 2010, Jürgen Hestermann wrote: y := case Other of bla : 'hello'; foo : 'bye'; baz : 'adius'; end; What do you gain with this? Doesn't look much different to case Other of bla : y := 'hello'; foo : y := 'bye'; baz : y :=

Re: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread Jürgen Hestermann
y := case Other of bla : 'hello'; foo : 'bye'; baz : 'adius'; end; What do you gain with this? Doesn't look much different to case Other of bla : y := 'hello'; foo : y := 'bye'; baz : y := 'adius';

Re: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread Michalis Kamburelis
ik wrote: On Sat, Feb 20, 2010 at 20:01, Jürgen Hestermann juergen.hesterm...@gmx.de mailto:juergen.hesterm...@gmx.de wrote: y := case Other of bla : 'hello'; foo : 'bye'; baz : 'adius'; end; What do you

Re: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread dmitry boyarintsev
Does this innovation makes case a function? procedure SomeProc(const v: string); SomeProc ( case Other of a: 'a'; b: 'b'; end; ); Imho, this reduces the code readability. thanks, dmitry

Re: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread Marco van de Voort
In our previous episode, dmitry boyarintsev said: Does this innovation makes case a function? I'd rather say an expression. procedure SomeProc(const v: string); SomeProc ( case Other of a: 'a'; b: 'b'; end; ); Imho,

Re: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread Graeme Geldenhuys
On 21 February 2010 17:00, Michalis Kamburelis michalis.ka...@gmail.com wrote: Which also means less chance of mistake. For example, if you decide later to change y to y1, you only have to change the code in one place, not three. Unfortunately you are wrong Michalis. Ever heard of

Re: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread dmitry boyarintsev
On Sun, Feb 21, 2010 at 9:03 PM, Graeme Geldenhuys graemeg.li...@gmail.com wrote: I vote against adding this language feature. It's not pascal-like and actually makes the code harder to read. It also only applies to simple assignment. Case begin..end blocks can do much more than simple

Re: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread Marco van de Voort
In our previous episode, dmitry boyarintsev said: assignment. Case begin..end blocks can do much more than simple oneliners. Maybe some-one would like to catch-up with Delphi/Prism? Wouldn't be possible to start a Prism mode to support new Delphi syntax features? (or modeswitch, just like

Re: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread dmitry boyarintsev
On Sun, Feb 21, 2010 at 9:22 PM, Marco van de Voort mar...@stack.nl wrote: I'd rather see the time spent on features that really matter (like generics, SEH/COM support, unicode). +1 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread Michalis Kamburelis
Graeme Geldenhuys wrote: On 21 February 2010 17:00, Michalis Kamburelis michalis.ka...@gmail.com wrote: Which also means less chance of mistake. For example, if you decide later to change y to y1, you only have to change the code in one place, not three. Unfortunately you are wrong

Re: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread Marco van de Voort
In our previous episode, Michalis Kamburelis said: You only need to change one variable, and all other instances will change to. And syncron-edit applies to any selection of text. So already works in more cases. Which is cool, but only if you and all your contributors use Lazarus for

Re[2]: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread JoshyFun
Hello FPC-Pascal, Sunday, February 21, 2010, 7:29:54 PM, you wrote: MK This is a matter of taste, I can imagine uses when at least functional MK if would make code *more* readable. Noone forces programmers to MK convert all their case/if to functional versions if they look MK unreadable. The

Re: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread David W Noon
On Sun, 21 Feb 2010 20:37:12 +0100, JoshyFun wrote about Re[2]: [fpc-pascal] some new features to delphi prisem: Sunday, February 21, 2010, 7:29:54 PM, you wrote: MK This is a matter of taste, I can imagine uses when at least MK functional if would make code *more* readable. Noone forces MK

Re[2]: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread JoshyFun
Hello FPC-Pascal, Sunday, February 21, 2010, 9:32:50 PM, you wrote: DWN This is actually valid ALGOL 60 and/or ALGOL 68. Conditional DWN expressions were available in both languages. I think Niklaus Wirth DWN continued with this in ALGOL W, but dropped it from Pascal. DWN Note that the ALGOLs

Re: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread Graeme Geldenhuys
Marco van de Voort wrote: IMHO Prism is not even Delphi. Just recycling of the brand. +1 I'd rather see the time spent on features that really matter (like generics, SEH/COM support, unicode). Definitely. I would like to add 'Interface Delegation' to that list. It's a vital part of

Re: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread Graeme Geldenhuys
Marco van de Voort wrote: It also proves that such solution external to the language is possible. That weakens the case for a language feature My point exactly! The language doesn't need such a feature because your editor of choice should be able to do that, and in Lazarus IDE that is the

[fpc-pascal] some new features to delphi prisem

2010-02-20 Thread ik
Hello, REM Objects released an interesting document regarding some changes (that looks so much like Ruby) to their Delphi Prisem. For example assignment of a value regarding a condition: x := if Something then 2; y := case Other of bla : 'hello'; foo : 'bye'; baz :

Re: [fpc-pascal] some new features to delphi prisem

2010-02-20 Thread Jürgen Hestermann
y := case Other of bla : 'hello'; foo : 'bye'; baz : 'adius'; end; What do you gain with this? Doesn't look much different to case Other of bla : y := 'hello'; foo : y := 'bye'; baz : y := 'adius'; end;

Re: [fpc-pascal] some new features to delphi prisem

2010-02-20 Thread ik
On Sat, Feb 20, 2010 at 20:01, Jürgen Hestermann juergen.hesterm...@gmx.dewrote: y := case Other of bla : 'hello'; foo : 'bye'; baz : 'adius'; end; What do you gain with this? Doesn't look much different to case Other of bla : y := 'hello'; foo : y

Re: [fpc-pascal] some new features to delphi prisem

2010-02-20 Thread Marco van de Voort
In our previous episode, ik said: Shorter write imho. Or something easily marketable to make people upgrade. Not a problem of FPC. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal