[fpc-pascal] some new features to delphi prisem
michalis.kambi at gmail.com
Sun Feb 21 16:00:36 CET 2010
> On Sat, Feb 20, 2010 at 20:01, Jürgen Hestermann
> <juergen.hestermann at gmx.de <mailto:juergen.hestermann at gmx.de>> wrote:
> y := case Other of
> bla : 'hello';
> foo : 'bye';
> baz : 'adius';
> What do you gain with this?
> Doesn't look much different to
> case Other of
> bla : y := 'hello';
> foo : y := 'bye';
> baz : y := 'adius';
> Shorter write imho.
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. Functional "case" and "if" are not only from Ruby,
also from all functional languages (sml, ocaml), also Python and even C
have functional "if".
I'm not saying that this is some revolutional or essential feature.
But just because "we can work without it" doesn't mean it's totally
More information about the fpc-pascal