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, no

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 wrote: Well, *this* can be done much easier ;-): 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

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 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 := 'h

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

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

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

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 m

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 dis

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 pref

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 licens

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, a

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 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-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

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 Int

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 ALGO

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

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. Th

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 Laza

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 > 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. Ev

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 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 http://lists.freepascal

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, ju

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 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 > oneliners. Maybe some-one

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

2010-02-21 Thread Graeme Geldenhuys
On 21 February 2010 17:00, Michalis Kamburelis 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 'syncron-edit'? http:/

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; ); >

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 Michalis Kamburelis
ik wrote: > On Sat, Feb 20, 2010 at 20:01, Jürgen Hestermann > mailto:juergen.hesterm...@gmx.de>> wrote: > > > > y := case Other of > bla : 'hello'; > foo : 'bye'; > baz : 'adius'; > end; > > > What do you gain with this

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-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-pasca

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 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 := 'b

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; __

[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 : 'ad