Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: New Apple programming language?



Permlink Replies: 417 - Last Post: Jun 30, 2014 3:10 AM Last Post By: Dejan Stanic
Eric Fleming Bo...

Posts: 48
Registered: 8/11/02
New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 2, 2014 1:05 PM
So.. apple made a new programming language called Swift: https://developer.apple.com/swift/
Now I feel the pain of those who learned Objective-C because it was the new hot language (Or not, since it is actually very old) and will now have to learn a new language since Objective-C will soon be obsolete since Apple is replacing it by this new language...

Yet.. another Cish language... as if the world hasn´t plently of those...
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 2, 2014 1:22 PM   in response to: Eric Fleming Bo... in response to: Eric Fleming Bo...
Eric Fleming Bonilha wrote:
So.. apple made a new programming language called Swift: https://developer.apple.com/swift/
Now I feel the pain of those who learned Objective-C because it was the new hot language (Or not, since it is actually very old) and will now have to learn a new language since Objective-C will soon be obsolete since Apple is replacing it by this new language...

Yet.. another Cish language... as if the world hasn´t plently of those...

Yeah, Cish.. I only wish...

if you want to declare variable you write
var Apples = 3


If you want to declare constant you write

let Apples = 3


What the hell is wrong with word const or constant or .... ?????

Dalija Prasnikar
Eric Fleming Bo...

Posts: 48
Registered: 8/11/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 2, 2014 1:27 PM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Yeah, Cish.. I only wish...

Looks like a mix... but it has many elements from C structure

What the hell is wrong with word const or constant or .... ?????

New language.. must look cool!
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 5:54 PM   in response to: Eric Fleming Bo... in response to: Eric Fleming Bo...
Eric Fleming Bonilha wrote:
Yeah, Cish.. I only wish...

Looks like a mix... but it has many elements from C structure

No. No it doesn't. Objective-C was built on top of C, hence it's more correct to say it has elements from Objective-C. But most of the new syntax is borrowed from Python, not from C. In fact, they compared it many times to Python during the presentation.

What the hell is wrong with word const or constant or .... ?????

New language.. must look cool!

You could make gallons of wine with all the sour grapes around here (but I wouldn't want to drink any of it). What's wrong with "const" or "constant", besides being longer, and older, are that they're not a verb like "let" is. This makes the code more English-like.
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 7, 2014 6:29 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Am 06.06.2014 02:54, schrieb Joseph Mitzen:
Eric Fleming Bonilha wrote:


What the hell is wrong with word const or constant or .... ?????

New language.. must look cool!

You could make gallons of wine with all the sour grapes around here (but I wouldn't want to drink any of it). What's wrong with "const" or "constant",
besides being longer, and older, are that they're not a verb like
"let" is. This makes the code more English-like.

Let doesn't say anything about the nature of the "construct", while
"var" or "const" does.

Greetings

Markus
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 6:36 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

Eric Fleming Bonilha wrote:
Yeah, Cish.. I only wish...

Looks like a mix... but it has many elements from C structure

No. No it doesn't. Objective-C was built on top of C, hence it's more
correct to say it has elements from Objective-C. But most of the new
syntax is borrowed from Python, not from C.

Oh? I could have sworn it was from Ruby. <g>

So what was borrowed from Python?
--
Rudy Velthuis (TeamB) http://www.teamb.com

"Now, my good man, this is no time for making enemies."
-- Voltaire, deathbed, when asked to renounce Satan
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 9, 2014 10:35 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:

Oh? I could have sworn it was from Ruby. <g>

There's a few things borrowed from Ruby, too (e.g. code blocks); they borrowed from Rust, a little from Haskell... it's quite an interesting combination of features from several different languages.

"I started work on the Swift Programming Language in July of 2010. I implemented much of the basic language structure, with only a few people knowing of its existence. A few other (amazing) people started contributing in earnest late in 2011, and it became a major focus for the Apple Developer Tools group in July 2013 [...] drawing ideas from Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and far too many others to list."

Time will tell if there was an overall design such that all the features work well together, or if it's a Frankenstein's monster. I haven't checked out the 500-page book yet, but there were some implementation details I wasn't able to find in the web materials.

This is an interesting article up in which the author speculates Apple was able to gain buzz for Swift on day one by making it look like EVERY language. He assembled about three pages of tweets in which people said that Swift looked like X, with lots of different languages being cited for X. :-)

So what was borrowed from Python?

That's a hard question to answer specifically because some features of swift are found in several languages and worse, some of those languages borrowed from each other so you don't know which one Apple borrowed them from. :-)

One thing that's definitely Python-like is in the class definition with an "init" method to initialize all the variables in the class. In Delphi, the constructor creates the class and handles initialization; in Python those are two separate methods.

The base class in the hierarchy is called Food, which is a simple class to encapsulate the name of a foodstuff. The Food class introduces a
single String property called name and provides two initializers for creating Food instances:
    class Food {
    var name: String
    init(name: String) {
    self.name = name
    }
    convenience init() {
    self.init(name: "[Unnamed]")
    }
    }

In Python the init method would need to be named "__init__" but otherwise it's the same idea, even down to using an explicit self to assign to internal variables. I'm a little shaky on the "convenience methods" they're using, but it looks like they're overloading the init.

You can initialize the class without calling a "new" or "create" method explicitly, just like Python:

let namedMeat = Food(name: "Bacon")
Nick Hodges

Posts: 2,414
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 2, 2014 2:09 PM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:


What the hell is wrong with word const or constant or .... ?????

The real question is: Curly braces? ;-)

--
Nick
Delphi Programming is Fun
Mike Margerum

Posts: 590
Registered: 12/1/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 2, 2014 4:48 PM   in response to: Nick Hodges in response to: Nick Hodges
On 6/2/2014 5:09 PM, Nick Hodges wrote:
Dalija Prasnikar wrote:


What the hell is wrong with word const or constant or .... ?????

The real question is: Curly braces? ;-)

Yes. haha.

but, no semicolons.
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 3, 2014 12:50 AM   in response to: Mike Margerum in response to: Mike Margerum
Mike Margerum wrote:

Yes. haha.

Hooray! We all love curly braces, don't we?

--
SteveT
Stewart Gaskell

Posts: 7
Registered: 3/9/01
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 3, 2014 1:34 AM   in response to: Steve Thackery in response to: Steve Thackery
On 03/06/2014 08:50, Steve Thackery wrote:
Mike Margerum wrote:

Yes. haha.

Hooray! We all love curly braces, don't we?
Easier to spell than "begin...end" :-)

Stewart
Kim Madsen

Posts: 362
Registered: 12/13/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 3, 2014 2:41 AM   in response to: Stewart Gaskell in response to: Stewart Gaskell
Den 6/3/2014 10:34, Stewart Gaskell skrev:
On 03/06/2014 08:50, Steve Thackery wrote:
Mike Margerum wrote:

Yes. haha.

Hooray! We all love curly braces, don't we?
Easier to spell than "begin...end" :-)

Stewart


"curly brace with the point pointing to the left" and "curly brace with
the point point to the right"

vs

"begin" and "end"

The later seems MUCH easier to spell :)

best regards
Kim Madsen
C4D

Stefan Glienke

Posts: 601
Registered: 1/5/09
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 3, 2014 2:56 PM   in response to: Stewart Gaskell in response to: Stewart Gaskell
Stewart Gaskell wrote:
Steve Thackery wrote:
Mike Margerum wrote:

Yes. haha.

Hooray! We all love curly braces, don't we?
Easier to spell than "begin...end" :-)

On a german keyboard I am so glad I can type begin/end instead of cricking my fingers to type these { and } (right alt + 7 or 0} ;)
M. Joos

Posts: 4
Registered: 4/23/01
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 4, 2014 4:29 AM   in response to: Stefan Glienke in response to: Stefan Glienke
+1
Stefan Glienke wrote:
Stewart Gaskell wrote:
Steve Thackery wrote:
Mike Margerum wrote:

Yes. haha.

Hooray! We all love curly braces, don't we?
Easier to spell than "begin...end" :-)

On a german keyboard I am so glad I can type begin/end instead of cricking my fingers to type these { and } (right alt + 7 or 0} ;)
Asbjørn Heid

Posts: 267
Registered: 11/12/12
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 4, 2014 5:29 AM   in response to: Stefan Glienke in response to: Stefan Glienke
Stefan Glienke wrote:
On a german keyboard I am so glad I can type begin/end instead of cricking my fingers to type these { and } (right alt + 7 or 0} ;)

I've got a norwegian keyboard, but I've always used us keyboard layout when programming as it flows much better I feel. Back it the days it was also to save 6kbytes of memory on the keyboard driver, good times :)

- Asbjørn
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 4, 2014 8:05 AM   in response to: Stefan Glienke in response to: Stefan Glienke
Stefan Glienke wrote:

Stewart Gaskell wrote:
Steve Thackery wrote:
Mike Margerum wrote:

Yes. haha.

Hooray! We all love curly braces, don't we?
Easier to spell than "begin...end" :-)

On a german keyboard I am so glad I can type begin/end instead of
cricking my fingers to type these { and } (right alt + 7 or 0} ;)

Same here. And on this Mac keyboard (when not in Windows) it is Alt+8
and Alt+9, i.e. not the same as in Windows. Drives me nuts, sometimes.

(FWIW, on the Mac, [] are Alt+5 and Alt+6, while in Windows, they are
Alt+8 and Alt+9, i.e. the same as curlies in OS X. Raaaaah!)

--
Rudy Velthuis (TeamB) http://www.teamb.com

"There are worse things in life than death. Have you ever spent
an evening with an insurance salesman?" -- Woody Allen
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 1:22 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:
Stefan Glienke wrote:

Stewart Gaskell wrote:
Steve Thackery wrote:
Mike Margerum wrote:

Yes. haha.

Hooray! We all love curly braces, don't we?
Easier to spell than "begin...end" :-)

On a german keyboard I am so glad I can type begin/end instead of
cricking my fingers to type these { and } (right alt + 7 or 0} ;)

Same here. And on this Mac keyboard (when not in Windows) it is Alt+8
and Alt+9, i.e. not the same as in Windows. Drives me nuts, sometimes.

(FWIW, on the Mac, [] are Alt+5 and Alt+6, while in Windows, they are
Alt+8 and Alt+9, i.e. the same as curlies in OS X. Raaaaah!)

+1

Different key combinations here, though.

Dalija Prasnikar
Jouni Aro

Posts: 86
Registered: 9/4/97
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 10:57 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
On 05/06/14 11:22, Dalija Prasnikar wrote:
Rudy Velthuis (TeamB) wrote:
Stefan Glienke wrote:

Stewart Gaskell wrote:
Steve Thackery wrote:
Mike Margerum wrote:

Yes. haha.

Hooray! We all love curly braces, don't we?
Easier to spell than "begin...end" :-)

On a german keyboard I am so glad I can type begin/end instead of
cricking my fingers to type these { and } (right alt + 7 or 0} ;)

Same here. And on this Mac keyboard (when not in Windows) it is Alt+8
and Alt+9, i.e. not the same as in Windows. Drives me nuts, sometimes.

(FWIW, on the Mac, [] are Alt+5 and Alt+6, while in Windows, they are
Alt+8 and Alt+9, i.e. the same as curlies in OS X. Raaaaah!)

+1

Different key combinations here, though.

And when using through Parallels the keys in the Windows VM are
sometimes the same as in OSX (Shift+Alt+8/9 for curlies here), but
sometimes they are the Windows ones (AltGr+7/0).
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 5:56 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:
Stefan Glienke wrote:
On a german keyboard I am so glad I can type begin/end instead of
cricking my fingers to type these { and } (right alt + 7 or 0} ;)

Same here.

Given German spelling, I always assumed their keyboards didn't have a space bar. Now you're telling me they don't have braces?
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 7, 2014 1:23 PM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

Rudy Velthuis (TeamB) wrote:
Stefan Glienke wrote:
On a german keyboard I am so glad I can type begin/end instead of
cricking my fingers to type these { and } (right alt + 7 or 0} ;)

Same here.

Given German spelling, I always assumed their keyboards didn't have a
space bar. Now you're telling me they don't have braces?

Of course they have braces, otherwise it would be very hard to program.
But to type a left curly on this keyboard, I must type the key
combination Alt+7 and to type a right curly, it is Alt+0. On most
Windows keyboards, these Alt values are printed on the key. Braces are
Alt+8 and Alt+9, respectively. Just like, to type a capital A, I must
type Shift+a. IOW, they have not just Shift values, they also have Alt
values on keys. Note that many of the keys you can't even type easily
are normal on most European keyboards, like ö ä ü ß, and á is simply ´
followed by a. IOW, they often have more key combinations than US
keyboards.

--
Rudy Velthuis (TeamB) http://www.teamb.com

"Incorrect documentation is often worse than no documentation."
-- Bertrand Meyer
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 4, 2014 9:48 AM   in response to: Stefan Glienke in response to: Stefan Glienke
Stefan Glienke wrote:

On a german keyboard I am so glad I can type begin/end instead of
cricking my fingers to type these { and } (right alt + 7 or 0} ;)

In fact, I'm sure someone from some obscure European country told me
they need to deploy their toes as well as their fingers when
programming in 'C'. :-)

--
SteveT

Van Swofford

Posts: 397
Registered: 6/28/03
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 4, 2014 11:49 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Stefan Glienke wrote:

On a german keyboard I am so glad I can type begin/end instead of
cricking my fingers to type these { and } (right alt + 7 or 0} ;)

In fact, I'm sure someone from some obscure European country told me
they need to deploy their toes as well as their fingers when
programming in 'C'. :-)

Good thing I'm a hillbilly programmer. I don't have to take my shoes
off for that. But then, my keyboard has curly braces {} as shifted
brackets []. So I can keep my toes on standby for doing high level
math. :-)

--
Cheers,
Van

"Good judgment comes from experience, and a lot of that comes from bad
judgment." - Will Rogers
Anders Gustavsson

Posts: 26
Registered: 9/26/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 4, 2014 1:17 PM   in response to: Stefan Glienke in response to: Stefan Glienke
+1
Stefan Glienke skrev 2014-06-03 23:56:
Stewart Gaskell wrote:
Steve Thackery wrote:
Mike Margerum wrote:

Yes. haha.

Hooray! We all love curly braces, don't we?
Easier to spell than "begin...end" :-)

On a german keyboard I am so glad I can type begin/end instead of cricking my fingers to type these { and } (right alt + 7 or 0} ;)
Arnaud BOUCHEZ

Posts: 143
Registered: 2/17/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 12:21 AM   in response to: Anders Gustavsson in response to: Anders Gustavsson
Anders Gustavsson wrote:
+1
Stefan Glienke skrev 2014-06-03 23:56:
On a german keyboard I am so glad I can type begin/end instead of cricking my fingers to type these { and } (right alt + 7 or 0} ;)

With modern IDEs, you do not write much { }
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 6:38 AM   in response to: Arnaud BOUCHEZ in response to: Arnaud BOUCHEZ
Arnaud BOUCHEZ wrote:

Anders Gustavsson wrote:
+1
Stefan Glienke skrev 2014-06-03 23:56:
On a german keyboard I am so glad I can type begin/end instead of
cricking my fingers to type these { and } (right alt + 7 or 0} ;)

With modern IDEs, you do not write much { }

You mean the Delphi IDE, right? Hardly any curlies, indeed. <g>

--
Rudy Velthuis (TeamB) http://www.teamb.com

"#3 pencils and quadrille pads."
-- Seymoure Cray (1925-1996) when asked what CAD tools he used
to design the Cray I supercomputer; he also recommended using
the back side of the pages so that the lines were not so
dominant.
Bruce McGee

Posts: 1,716
Registered: 9/30/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 6:44 AM   in response to: Arnaud BOUCHEZ in response to: Arnaud BOUCHEZ
Arnaud BOUCHEZ wrote:

With modern IDEs, you do not write much { }

Agreed. In Delphi, I hardly write these at all. :)

--
Regards,
Bruce McGee
Glooscap Software
Graeme Geldenhuys

Posts: 152
Registered: 5/25/01
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 10, 2014 2:09 PM   in response to: Stefan Glienke in response to: Stefan Glienke
On 2014-06-03 22:56, Stefan Glienke wrote:

On a german keyboard I am so glad I can type begin/end instead of
cricking my fingers to type these { and } (right alt + 7 or 0} ;)

It's time you guys switch to the Programmer Dvorak keyboard layout. Most
single character symbols are all a single key press. I switch to Dvorak
(under Windows, MacOSX and Linux) many years back and never looked back
since.

ps:
I hate the C-style braces too - just because. ;-)

Regards,
- Graeme -

Loren Pechtel

Posts: 20
Registered: 3/23/00
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 1:09 PM   in response to: Stewart Gaskell in response to: Stewart Gaskell
On Tue, 3 Jun 2014 01:34:48 -0700, Stewart Gaskell
<big_stew at talk21 dot com> wrote:

On 03/06/2014 08:50, Steve Thackery wrote:
Mike Margerum wrote:

Yes. haha.

Hooray! We all love curly braces, don't we?
Easier to spell than "begin...end" :-)

Yup. I have a problem with typing "beign" for some reason.

I find begin...end much clearer, though.
Linden ROTH

Posts: 467
Registered: 11/3/11
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 14, 2014 10:56 PM   in response to: Loren Pechtel in response to: Loren Pechtel
Leap year post count :)
--
Linden
"Mango" was Cool but "Wasabi" was Hotter but remember it's all in the "source"
Arthur Hoornweg

Posts: 414
Registered: 6/2/98
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 17, 2014 7:08 AM   in response to: Loren Pechtel in response to: Loren Pechtel
Loren Pechtel wrote:

Yup. I have a problem with typing "beign" for some reason.

I wouldn't worry too much about that affliction, I'm sure it is benign.

Nick Hodges

Posts: 2,414
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 17, 2014 10:27 AM   in response to: Loren Pechtel in response to: Loren Pechtel
Loren Pechtel wrote:

Yup. I have a problem with typing "beign" for some reason.

Create a live template that fixes this:

<?xml version="1.0" encoding="utf-8" ?>

<codetemplate xmlns="http://schemas.borland.com/Delphi/2005/codetemplates"
version="1.0.0">
<template name="beign" invoke="auto">
<description>
Changes beign to begin
</description>
<author>
Nick Hodges
</author>
<code language="Delphi"><![CDATA[begin ]]>
</code>
</template>
</codetemplate>

--
Nick
Delphi Programming is Fun
John Treder

Posts: 349
Registered: 8/2/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 17, 2014 7:34 PM   in response to: Nick Hodges in response to: Nick Hodges
Nick Hodges wrote:

Loren Pechtel wrote:

Yup. I have a problem with typing "beign" for some reason.

Create a live template that fixes this:

<?xml version="1.0" encoding="utf-8" ?>

<codetemplate xmlns="http://schemas.borland.com/Delphi/2005/codetemplates"
version="1.0.0">
<template name="beign" invoke="auto">
<description>
Changes beign to begin
</description>
<author>
Nick Hodges
</author>
<code language="Delphi"><![CDATA[begin ]]>
</code>
</template>
</codetemplate>

And here I thought Loren was thinking "beignet" and didn't finish typing it. Silly me!

--
Tred
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 3, 2014 4:33 AM   in response to: Nick Hodges in response to: Nick Hodges
Nick Hodges wrote:
Dalija Prasnikar wrote:


What the hell is wrong with word const or constant or .... ?????

The real question is: Curly braces? ;-)

That was expectable, at least they are far better than Python blocks
that depends only on indentation.

Dalija Prasnikar
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 3, 2014 9:44 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:

That was expectable, at least they are far better than Python blocks
that depends only on indentation.

No, nooo! I like that about Python.

;-)

--
SteveT
Bruce McGee

Posts: 1,716
Registered: 9/30/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 3, 2014 12:33 PM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Dalija Prasnikar wrote:

That was expectable, at least they are far better than Python blocks
that depends only on indentation.

No, nooo! I like that about Python.

;-)

Not sure if you're making a joke about masochism or if you really do
like this.

If it's the latter, I'd love to know why. It's always driven me nuts.

--
Regards,
Bruce McGee
Glooscap Software
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 4, 2014 3:12 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:
Dalija Prasnikar wrote:

That was expectable, at least they are far better than Python blocks
that depends only on indentation.

No, nooo! I like that about Python.

;-)

Would you make up your mind. Either you are curly braces guy or indentation
guy. You CANNOT be both ;-)

But on the other hand it doesn't matter too much. Either way you will get
tarred and feathered here.

Dalija Prasnikar
Van Swofford

Posts: 397
Registered: 6/28/03
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 4, 2014 7:02 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:

Would you make up your mind. Either you are curly braces guy or
indentation guy. You CANNOT be both ;-)

But on the other hand it doesn't matter too much. Either way you will
get tarred and feathered here.

I like Curly braces. Nyuk, nyuk, nyuk. :-)

--
Cheers,
Van

"Good judgment comes from experience, and a lot of that comes from bad
judgment." - Will Rogers
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 4, 2014 7:14 AM   in response to: Van Swofford in response to: Van Swofford
Van Swofford wrote:
Dalija Prasnikar wrote:

Would you make up your mind. Either you are curly braces guy or
indentation guy. You CANNOT be both ;-)

But on the other hand it doesn't matter too much. Either way you will
get tarred and feathered here.

I like Curly braces. Nyuk, nyuk, nyuk. :-)

<looking for a can of tar and pillow>

Dalija Prasnikar
Nick Hodges

Posts: 2,414
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 4, 2014 7:16 AM   in response to: Van Swofford in response to: Van Swofford
Van Swofford wrote:


I like Curly braces. Nyuk, nyuk, nyuk. :-)

Groan.

--
Nick
Delphi Programming is Fun
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 4, 2014 8:01 AM   in response to: Nick Hodges in response to: Nick Hodges
Nick Hodges wrote:

Van Swofford wrote:


I like Curly braces. Nyuk, nyuk, nyuk. :-)

Groan.

+1


--
Rudy Velthuis (TeamB) http://www.teamb.com

"Not even computers will replace committees, because committees
buy computers." -- Unknown

Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 4, 2014 9:55 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:

Would you make up your mind. Either you are curly braces guy or
indentation guy. You CANNOT be both ;-)

Actually, it's a kind of boolean logic thing: (NOT A) = B + C.

In other words, I particularly detest, with a capital D, the use of
'begin' and 'end'. Truly, joking aside - I hate having to type them
and hate having to read them. Thus compared with 'begin/end', curly
braces OR indents are wonderful.

I don't understand why people object to Python's system. If you
always indent your blocks anyway, as I do religiously, it makes the
delimiters superfluous. It's a logical conclusion simply to enforce
the indenting, and do away with the delimiters altogether.

--
SteveT
Van Swofford

Posts: 397
Registered: 6/28/03
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 4, 2014 11:53 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Dalija Prasnikar wrote:

Would you make up your mind. Either you are curly braces guy or
indentation guy. You CANNOT be both ;-)

Actually, it's a kind of boolean logic thing: (NOT A) = B + C.

In other words, I particularly detest, with a capital D, the use of
'begin' and 'end'. Truly, joking aside - I hate having to type them
and hate having to read them. Thus compared with 'begin/end', curly
braces OR indents are wonderful.

I don't understand why people object to Python's system. If you
always indent your blocks anyway, as I do religiously, it makes the
delimiters superfluous. It's a logical conclusion simply to enforce
the indenting, and do away with the delimiters altogether.

Then there are the few remaining old timers like me that still use vi
as an editor, which replaces leading spaces with tabs when there are 8
or more of them. If you open a file that has been saved by vi in
another editor, the leading spacing can be a little bizarre looking.
For instance, some lines that are indented properly in vi, will be
outdented when opened in the Delphi editor. Wonder if that has any
effect on how Python would interpret it?

As for me, I prefer curly braces, but begin..end are fine. Just a
matter of convention.

--
Cheers,
Van

"Good judgment comes from experience, and a lot of that comes from bad
judgment." - Will Rogers
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 4, 2014 12:04 PM   in response to: Van Swofford in response to: Van Swofford
Van Swofford wrote:

As for me, I prefer curly braces, but begin..end are fine. Just a
matter of convention.

Hooray! That's two of us who prefer curly braces!

--
SteveT
Asbjørn Heid

Posts: 267
Registered: 11/12/12
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 4, 2014 1:07 PM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:
Van Swofford wrote:

As for me, I prefer curly braces, but begin..end are fine. Just a
matter of convention.

Hooray! That's two of us who prefer curly braces!

I used to strongly dislike curly braces, after having learned programming in pascal, and used it for many years. But after a recent stint in C++, I've grown to prefer them.

Though not a huge issue for me, begin fits pascal ok.

- Asbjørn
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 4, 2014 4:12 PM   in response to: Asbjørn Heid in response to: Asbjørn Heid
Asbjørn Heid wrote:

But after a recent stint in C++, I've grown to prefer them.

Three!

--
SteveT
Vladimir Ulchenko

Posts: 248
Registered: 1/12/00
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 4, 2014 10:27 PM   in response to: Steve Thackery in response to: Steve Thackery
On Wed, 4 Jun 2014 16:12:46 -0700, Steve Thackery <nobody at nowhere dot com> wrote:

Three!

do not forget occasional bcb lurkers ;)

--
Vladimir Ulchenko aka vavan
Jim Fleming

Posts: 113
Registered: 2/12/00
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 3:21 PM   in response to: Steve Thackery in response to: Steve Thackery
"Steve Thackery" <nobody at nowhere dot com> escribió en el mensaje news:678732 at forums dot embarcadero dot com...
Asbjørn Heid wrote:

But after a recent stint in C++, I've grown to prefer them.

Three!

And I hate them with a vengeance, so -1000

giving a grand total of -997 !!!

Kaput.

--
JF
Nick Hodges

Posts: 2,414
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 3:43 PM   in response to: Jim Fleming in response to: Jim Fleming
Jim Fleming wrote:


giving a grand total of -997 !!!

Make that -1997. ;-)

--
Nick
Delphi Programming is Fun
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 6:17 PM   in response to: Nick Hodges in response to: Nick Hodges
Nick Hodges wrote:
Jim Fleming wrote:


giving a grand total of -997 !!!

Make that -1997. ;-)

Yes, it often feels like 1997 around here. ;-) ;-)
Dejan Stanic

Posts: 11
Registered: 5/4/03
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 4:45 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:
Yes, it often feels like 1997 around here. ;-) ;-)

LOL!
Stewart Gaskell

Posts: 7
Registered: 3/9/01
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 4:11 AM   in response to: Jim Fleming in response to: Jim Fleming
On 05/06/2014 23:21, Jim Fleming wrote:
"Steve Thackery" <nobody at nowhere dot com> escribió en el mensaje news:678732 at forums dot embarcadero dot com...
Asbjørn Heid wrote:

But after a recent stint in C++, I've grown to prefer them.

Three!

And I hate them with a vengeance, so -1000

giving a grand total of -997 !!!

Kaput.

--
JF

Uh oh. I can hear the approaching rumble...of a war starting :-)
Being a C++ and C# kinda chap I like the short and curlies, but don't
begrudge the begin...end of Delphi.
IMHO, both syntaxes seem to fit in with the rest of their respective
languages.

Stewart
david hoke

Posts: 616
Registered: 2/9/07
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 5:30 AM   in response to: Stewart Gaskell in response to: Stewart Gaskell
"Stewart Gaskell" <big_stew at talk21 dot com> wrote in message
news:679086 at forums dot embarcadero dot com...
On 05/06/2014 23:21, Jim Fleming wrote:

Uh oh. I can hear the approaching rumble...of a war starting :-)
Being a C++ and C# kinda chap I like the short and curlies, but don't
begrudge the begin...end of Delphi.
IMHO, both syntaxes seem to fit in with the rest of their respective
languages.

Maybe Delphi could strike a compromise adopting '[' and ' ]' instead of '{'
and '}' to replace begin/end. (Or does it support that already?)

Then the brackets wouldn't 'curl'. :)

IIRC, that was supported by Microsoft PASCAL.
Asbjørn Heid

Posts: 267
Registered: 11/12/12
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 5:46 AM   in response to: david hoke in response to: david hoke
david hoke wrote:
Maybe Delphi could strike a compromise adopting '[' and ' ]' instead of '{'
and '}' to replace begin/end. (Or does it support that already?)

Even though I prefer {} I wouldn't want to change that in Delphi now. Way too late for that.

Instead they should improve the compiler and language in other ways.

- Asbjørn
david hoke

Posts: 616
Registered: 2/9/07
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 6:31 AM   in response to: Asbjørn Heid in response to: Asbjørn Heid
"Asbjørn Heid" <=?Utf-8?Q?Asbj=C3=B8rn_Heid?=> wrote in message
news:679110 at forums dot embarcadero dot com...
david hoke wrote:
Maybe Delphi could strike a compromise adopting '[' and ' ]' instead of
'{'
and '}' to replace begin/end. (Or does it support that already?)

Even though I prefer {} I wouldn't want to change that in Delphi now. Way
too late for that.

IIRC MS PASCAL supported both. It doesn't seem to be too late to add other
things. A relatively simple token equivalent shouldn't be too difficult.
(Says the past toy-compiler hobbiest.)

Instead they should improve the compiler and language in other ways.

Perhaps.
Asbjørn Heid

Posts: 267
Registered: 11/12/12
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 7:05 AM   in response to: david hoke in response to: david hoke
david hoke wrote:
IIRC MS PASCAL supported both. It doesn't seem to be too late to add other
things. A relatively simple token equivalent shouldn't be too difficult.
(Says the past toy-compiler hobbiest.)

The issue for me is that it leads to "mixed code", which IMO is a considerably worse option.

Instead they should improve the compiler and language in other ways.

Perhaps.

No, they definitely should ;)
IMO there are many things "missing" from the Delphi language and compiler. My top list for language features are
- a conditional operator, x := if (a > 5) then 3 else 4;
- inline, scoped variable declaration, var x: integer := 42;
- generic free functions, function dynamic_cast<T: class>(const obj: TObject): T;

In addition the compiler desperately needs significantly improved type deduction, so we don't have to force the type parameter for something like function initialize<T>(const Value: T; const A: TArray<T>);

And the compiler needs some optimization love, especially with a focus on removing stack juggling which is killing performance in very many cases.

- Asbjørn
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 9:36 PM   in response to: Asbjørn Heid in response to: Asbjørn Heid
Asbjørn Heid wrote:

IMO there are many things "missing" from the Delphi language and compiler. My top list for language features are
- a conditional operator, x := if (a > 5) then 3 else 4;

Definitely. Python switches the syntax a bit from your example, e.g.

x = 3 if a > 5 else 4

which might be a little clearer.

- inline, scoped variable declaration, var x: integer := 42;

I'd go farther and suggest that type inference is absolutely necessary (I can't find one statically typed language created from 2000 onwards that doesn't have it).

var x := 42;

ought to be enough. Of course type inference is present in Swift as well.

- generic free functions, function dynamic_cast<T: class>(const obj: TObject): T;

Also on my list. :-) There are lots of places where our "first class functions" aren't first class citizens. RTTI is another area.

My own list, begun by sitting down with Delphi to write code and a piece of paper beside me to record anything I felt was only partially implemented, grew so big I ran out of room on the paper. :-(

Just some of the highlights that you didn't already mention:

operator overloading of classes
eliminate forward declarations
a power symbol, which really should have been implemented sometime in the past thirty years or so
ditto regarding a step clause for the "for" loop
ditto regarding strings in case statements
powerful serialization of all types
a built-in logging unit
real first-class types
record helpers that don't replace existing ones
get rid of begin...end

a better order of precedence for operations; even Knuth admitted C's (which Delphi uses) were a bad idea in retrospect. I should be able to write
if x = 7 or a = 3
without needing any parentheses

automatic memory management

a consistent operator that checks for membership, i.e. "in". "In" should work for everything: sets, dictionaries, arrays, strings, etc. I'd like to feel like the language was designed and not completely ad-hoc

iteration through database results, among many other things. Iteration EVERYWHERE and recognizing it as a programming paradigm would be best

Abandon the ancient sorting implementation. I should be able to sort almost anything without creating a custom sorting function. Put those generics, variants and interfaces to good use.

full argument packing/unpacking. Delphi only has the barest of functionality in this area.

Named parameters. They allow for elegant APIs and clear code and once you use them it's hard to do without them. Take a look at the Dateutils unit if you want to see the nightmare that results without them.

multiple assignment: x, y, z := 1, 2, 3. Also x := y := z := 0 and a, b := b, a.

List (and dict and set) comprehensions. Last week using Python I had a list of datetimes ("wednesdays") and I wanted to filter that list to not include certain special reserved dates (contained in "special_wednesdays"). I also wanted to turn those datetimes into just dates. I wrote:


good_days = [day.date() for day in wednesdays if day.date() not in special_wednesdays]
 


Sorry, but that's about as close to English as one is going to get. It's also mapping and filtering of the famous "filter/map/reduce" paradigm. Comprehensions, LINQ, whatever... Delphi needs a mechanism that turns common filtering/mapping/reducing operations into a single line of English-like code. If I have a list of people that includes name and salary info, I need to be able to write

total_salary = sum(person.salary for person in people)


Anything that enables one to express a single thought in a single line of code without switching into algorithm mode (and the mental context-switching cost this provides) is a boon to productivity and clean, easy-to-read code. Delphi needs more features that let us write what we want to do instead of laboriously writing how it should be done. Queue people who think the more pedantic and long-winded the code the better it is, or the smarter the developer, in 3, 2, 1.....

generators - Delphi needs more "lazy evaluation" of items. We need a simple way to do this.

Get rid of anonymous functions. They make zero sense in a language that has nested functions. There's no difference between

whatever := Function(x, y: Integer): Integer;....


and
Function whatever(x, y: Integer): Integer;.....


All Delphi needed was the ability to place nested functions anywhere in the code block rather than defined before the start of the parent function and there would be no need for anonymous functions. It really starts to show that Delphi doesn't have any academic types at the helm anymore. Worse, closures can't return a nested function for some (lazy, sloppy) reason, which makes the claim of "first class functions" simply not true. Either they are or they aren't. No turning in half-baked solutions that would fail an entry level language design course. Get rid of the anonymous functions and remove whatever "optimization" prevents nested functions from being returned. This language needs to be beaten into consistency. :-)

It's 2014. It's time for built-in multiprocessing support. Bauer and Intersimone have been yammering about special parallel coding syntax for 6 and 8 years respectively. Wayne Williams did the same thing at CodeRage before he was whisked away to Dick Cheney's undisclosed location. Enough spinning tales to placate the masses and actually do it. And not just multithreading either. MultiPROCESSING too - the superior but oft-ignored solution. When Delphi can execute code on a 64K core supercomputer with one extra line of code, the job will be done.

Package management. Again, it's 2014. EVERYTHING has package management. I was reading an article the other day that included this line to try to make its point: "You wouldn't choose to use a language without package management today, would you? So why would you...." C# has NuGet. PHP has CPAN. R has CRAN. Python has PyPi. Delphi has Jack Spit. :-( Once upon a time there was Torry, but that's never left the 90s. The last user survey contained a line about a "software store" which got me excited until the full question made it clear EMBT was just thinking of an online store where commercial libraries could be sold and they could get a cut of the profit.
In most other languages that's either a central repository or a central index of (usually open source) libraries. This repository has its own API so that it can be integrated into tools and IDEs. It's a simple step to search for and (un)install any package from the repository. The tools often include the ability to install any dependencies the selected package has : e.g. if package A requires B and C then installing A will also install B and C automatically. All of the packages can also be updated as well.
Delphi has a lot of functional gaps - a LOT. New users can't be expected to know about much less hunt down all of the third party libraries required to flesh it out. I'll never forget the time Rudy told me that Delphi didn't need an arbitrary precision integer unit in the standard library because there was code for one posted on some Russian blog in 2010 and "it probably still compiles". (!?!?!?!?) Sorry, that's not how commercial development works... people don't spend hours today using Google and hunting down code to cut and paste from blogs to get needed functionality. They type a few words into a command line or an IDE then select an option or click a box and install exactly what they're looking for. We can't seriously hope to win over developers coming from... well, almost anything without package management.

Related - virtual environments. Have version 3 of package X but afraid of upgrading to version 4 because it'll break old code? Not a problem when each project can have its own virtual environment that includes its own copy of any libraries it's using. With good virtual environment support, a list of all libraries and versions a project depends on can be exported into a file and then used on another system to install all of its dependencies (via package management) in one go.

slice notation - no more Copy(something, 5 Length(something) - 4). Let me do something[5:] or something[1:3] or get the last three characters of a string or elements of an array by something[-3:].

Design by contract. I first saw this request appear from a Delphi user in 1998. I'm assuming that after 16 years there's no way to do it via 3rd party library (which is sad if the language isn't powerful enough to do so). Making sure parameters a and b are integers is ok (and rarely useful)... what if I need to make sure that a is at least 5 and that b is greater than a? That's where design by contract can come in and is especially useful for either very complicated libraries or in cases of small functions where the boilerplate to do these value checks would be longer than the function proper otherwise. Delphi spin-offs like Oxygene (and DWScript?) already support this.

Type inference - mentioned earlier.

Interface/Implementation : No. Just no more. While better than include files, this is rooted in legacy single-pass compiler design. A few months ago I was looking at Delphi code and wasn't sure what a method did as I had nothing but its ambiguous name to go on. I looked for the method code to see what it did. Page down... page down, page down, page down... probably close to 10 pages down to get past the other object class definitions and then some of their method implementations. When I finally got to the right area, I'd forgotten the name of the method I was looking for! Back up 10 pages, where I repeated the name to myself three times slowly to be sure I remembered it, then back down 10 pages again. THIS. IS. INSANE. Any justification you ever hear for this that isn't "single pass compiler" is an ad-hoc reason someone made up to try to defend it. It's ridiculous and evolution bares this out. It's been borrowed by no other language ever (that wasn't a Delphi clone). When Delphi dies this separation will die with it and via natural selection it will go extinct. Let's use a little bit of artificial selection to hasten its demise. My page down key and short term memory will thank you.

Documentation - Documentation is not an optional activity (unless you're EMBT, apparently). The culture EMBT engenders towards documentation is sorrowful and it influences everything in the Delphi community. I believe Arnaud is single-handedly keeping the notion of documentation alive there. Hint: XML is not a markup that any human wants to write in much less read. Also, an automated API dump IS NOT DOCUMENTATION. Delphi needs bundled documentation tools (not crippleware of a 3rd party product) and built-in libraries related to documentation. And a real official markup language. If it's called ARNAUD, even better. I've read worse novels than his code comments.

Native unit testing - as above. Unit testing is not something optional for enterprise software that one should have filled by 3rd parties. As is, the semiofficial unit testing library for Delphi stopped being updated (which is why you don't leave it to 3rd parties) and now lots of splinter libraries have shown up, without much clue as to which will win and which will survive. That's not a good, stable situation. I want official unit testing and I want it integrated into the IDE with official support tools. From a review of the PyCharm IDE:

In PyCharm, if I want to run a test I’m working on, I hit a keyboard shortcut that detects the test method or class my cursor is within and offers
to run or debug it. In the dialog box that opens when I hit this keyboard shortcut I have several options for how to run the test, based on the test
runners PyCharm finds for the configured interpreter (nose, Unittest, py.test, etc.). I can type the number of an option to run it.

Test output appears in a panel at the bottom of the window. If the test raises an exception, PyCharm converts each line of the stack trace into a
hyperlink that opens the file in question at that line when I click on it.

Seems simple, right? After using these features for a year, I can’t live without them. Here’s why:

After the tests run, I can hit a keyboard shortcut to jump between the tests I ran (useful if some failed)
When I'm writing code, I can hit a keyboard shortcut that reruns the last test immediately (no context switch required)
I want to give JetBrains $100 just for turning lines of a stack trace into hyperlinks

HTML parsing - how the heck can a modern framework have no support for parsing HTML? No, some sort of ActiveX link to Internet Explorer isn't the same thing. And no, neither is using regex. On a related front, why do I have to pay $500 more for (poor) JSON support?

Tuples - simple, powerful, incredibly useful, a tuple is an immutable collection of values of any type(s). Very useful for multiple return values, such as returning ("John", 39, 43000) or (x, y, z). Swift added them; we need them too. Someone took a swipe at Google Go and said its design was "from the 1960s" because it lacked tuples. I wonder what the tech author would think about Delphi?

Stack traces - yet again, not something optional to be left up to 3rd parties. This is the kind of thing that keeps Delphi from being invited into the enterprise.

Hashes - holy *%&$%(#, it's 2014 and there isn't even a "hashes" unit with all the common hashes in one place. But at least we finally got a zip handler... maybe in 20 years we can get the rest of the common compression formats.... :-(

Deep copy of objects - we've got copy but no deep copy. Deep copy is hard and tricky, and that's why we need it.

Sets - We need sets. No, some of you will be surprised to learn Delphi doesn't have sets and never did. What we have is some sort of fixed length binary array that Delphi calls a set. This structure has not been updated since Turbo Pascal, and is supposedly "optimized" - in other words, it doesn't do what you need but does it fast! Of course, sets were never the bottleneck in any code ever written.... A real set has no limit on its size. If it did have a limit, it would not be 255. A set is not limited to values between 0-255. A set can contain anything for which equality can be determined (i.e. hashable). In mathematics you can have "the set of integers", "the set of whole numbers", a set of points, "the set of people named Timmy", etc. Even Oxygene and Nimrod don't seem to understand what a real set is. :-( If Delphi were to ever gain sets, they would need to have no limit to size and contain any hashable item (in the interest of static typing we could confine them to an identical type). That you can write

If x in [5, 6, 9]


but not

If x in [5, 6, 900]


is just ridiculous and why people laugh at us and steal our lunch money. :-( Someone somewhere failed basic algebra and never learned what a set was. If we had real sets, they might actually be useful for something! I've used real sets more in the last few weeks than I ever used in Delphi in my whole life (which is approximately zero times). Hint: STRINGS. Putting words in sets opens up wonderful possibilities for text processing.

Profiling - another item that is not optional and should not be left up to 3rd parties. And no one pays $600 to be able to profile their 64bit code.

Arbitrary precision integer arithmetic unit. Everyone has one of these today, except us.
A real Decimal type.
A real complex number implementation (basic type would be nice). There's only the pre-record with objects code in the standard library and a set of code Marco wrote in the Samples code, which I assume means its undocumented and unsupported. :-( This is another reason that Delphi isn't welcome in math, science or finance, let alone the enterprise. Math support is awful.
Fraction support.

After 19 years, an OS-independent way to launch a file/process would be nice. Qt has one. Python has one. FreePascal has one. In "cross-platform" Delphi you need IFDEFs and OS functions just to launch a PDF file.

Partial function support.

x < y < z, not some "between" function.

No 255 character string literal limit in the IDE (Lazarus has the same problem)

One string type


This would just be the top of my complaints/wish list, without getting into the IDE proper or the VCL/FireMonkey libraries! Too much of the language still looks like 1980s Turbo Pascal and that is NOT a good thing. The state of the art has advanced far in 30 years and the "RAD" in "RAD Studio" needs to mean something again.

Apple did a great job borrowing the "best in show" from many languages and tossing them into Swift while keeping a general design goal in mind. They also were smart enough to toss out a free 500-page book to help people learn it. EMBT should be paying a lot of attention. Things like Swift are the real competition, not Oxygene. Their language overhaul can't come a moment too soon (and yet I fear it's going to be far too anemic and lack the boldness that Apple used with Swift).


Lambda - this is the one inline function Delphi could use, yet it's the one we don't have.

Enums that work - Barry Kelley claimed that RTTI for custom enums couldn't work because of some backward compatibility issue (???!!!???) and he'd need to implement a different class to due it. That doesn't make a lick of sense of me.

Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 7, 2014 1:38 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

a better order of precedence for operations; even Knuth admitted C's
(which Delphi uses) were a bad idea in retrospect. I should be able
to write if x = 7 or a = 3 without needing any parentheses

Actually, as an inexperienced programmer I've always tended to dislike
operator precedence rules. Mainly because they can result in some
hard-to-spot bugs when I've written the code, and some
hard-to-interpret code when an expert has written it. Thus I often use
brackets even where they aren't necessary, simply to make it absolutely
explicit to the reader (myself, the following week) what was intended.

I'd like to see, or at least try out, a language where there are no
precedence rules; by that, I mean that any statement where precedence
could be ambiguous must specify that precedence with brackets. In
other words, all precedence must be explicitly expressed by the
programmer, and the compiler would reject anything that isn't.

It's just an idea that I mull over occasionally, and I'm not
experienced enough to know whether it would be feasible.

--
SteveT
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 6:46 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Joseph Mitzen wrote:

a better order of precedence for operations; even Knuth admitted C's
(which Delphi uses) were a bad idea in retrospect. I should be able
to write if x = 7 or a = 3 without needing any parentheses

Actually, as an inexperienced programmer I've always tended to dislike
operator precedence rules.

Languages that don't have them can be very confusing:

x := a + b * 3;

Most people would expect

x := a + (b * 3);

but without operator precedence, it would be:

x := (a + b) * 3;

This principle (operator precedence) is extended to other operators,
and it makes a lot of sense.

--
Rudy Velthuis (TeamB) http://www.teamb.com

"Beware of the man whose god is in the skies."
-- George Bernard Shaw
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 6:54 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:

Languages that don't have them can be very confusing:

You didn't read the rest of my post! :-)

I went on to say that wherever precedence could be ambiguous, it
must be specified with brackets and that this rule should be enforced
by the compiler.

Thus:

x := a + b * 3;

...wouldn't compile.

The programmer would have two write one of these:

x := (a + b) * c;
x := a + (b * c);

See what I mean? I'd strongly prefer that, and indeed that is how I
write my own code. I force all precedence with brackets.

--
SteveT
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 7:15 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

I went on to say that wherever precedence could be ambiguous, it
must be specified with brackets and that this rule should be enforced
by the compiler.

Thus:

x := a + b * 3;

...wouldn't compile.

But it SHOULD compile. It is a normal mathematical expression, and it
should be possible to write those without enforcing precedence with
parentheses and without unexpected results. Any language that would
require parentheses for such simple expressions would be pretty
confusing and probably not become very popular.
--
Rudy Velthuis (TeamB) http://www.teamb.com

"The United States is in no sense founded upon the Christian
doctrine."
-- George Washington Administration Treaty
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 9:32 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:

But it SHOULD compile. It is a normal mathematical expression, and it
should be possible to write those without enforcing precedence with
parentheses and without unexpected results.

That's if you assert that a mathematically valid expression should also
be valid to a compiler. I'm simply saying that mathematical precedence
can itself be obscure to some people, and that I'd quite like to try a
language that requires all precedence to be enforced. It would be
interesting to see what real code would look like.

Any language that would
require parentheses for such simple expressions would be pretty
confusing and probably not become very popular.

Not confusing. How are:

x = a + (b * c)
x = (a + b) * c

...confusing? They are totally explicit. But I agree: it would
certainly be unpopular because programmers hate extra keystrokes. :-)

--
SteveT
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 9:33 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

that requires all precedence to be enforced

.....with brackets, I mean.

--
SteveT
Paul Scott

Posts: 33
Registered: 10/27/01
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 11:22 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve,

On Sun, 08 Jun 2014 17:32:57 +0100, Steve Thackery <nobody at nowhere dot com>
wrote:

Rudy Velthuis (TeamB) wrote:

But it SHOULD compile. It is a normal mathematical expression, and it
should be possible to write those without enforcing precedence with
parentheses and without unexpected results.

That's if you assert that a mathematically valid expression should also
be valid to a compiler. I'm simply saying that mathematical precedence
can itself be obscure to some people, and that I'd quite like to try a
language that requires all precedence to be enforced. It would be
interesting to see what real code would look like.

Any language that would
require parentheses for such simple expressions would be pretty
confusing and probably not become very popular.

In MU5 Autocode[1], operators were applied strictly left-to-right...

"The operator precedence is strictly left to right, in contrast to most
high-level languages. There are several reasons for this.
Firstly, the calculations in systems programs are often of a logical
rather than a mathematical nature, and use operators for which precedence
rules are not well established.
Secondly, it is easier to see that efficient code is being compiled when
evaluation is left to right than when implicit stacking of partial results
is taking place.
Thirdly, since different languages have varying precedence rules an equal
precedence convention is the
most convenient for use in the target language.

"Precedence can be forced by the use of bracketed sub-expressions which
explicitly demand the stacking of a partial result on the opening bracket,
and the application of a reverse operation on the closing bracket"

Not confusing at all - but that might have been because "store results"
was "just another operator" and also operated left-to-right, rather than
Algol/Pascal's "right-to-left

[1] http://comjnl.oxfordjournals.org/content/15/2/109.full.pdf
--
Paul

Paul Scott

Posts: 33
Registered: 10/27/01
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 11:25 AM   in response to: Paul Scott in response to: Paul Scott
Whoops! What happened then? How did that part message get sent?

Anyway, "store" ("=>") was just another (right-to-left) operator, so you
could write

a + b => c * 2 + 1 => d

--
Paul

Paul Scott

Posts: 33
Registered: 10/27/01
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 11:34 AM   in response to: Paul Scott in response to: Paul Scott
Not to mention "what goes around, comes around"

"At an early stage in the design of the MU5 software it was decided to
introduce a compiler target language (CTL) into which the high level
languages would be translated. For each high level language a translator
would be provided to convert from the language to CTL while a single
compiler converts from CTL to machine code. The objective was to simplify
individual translators by forcing the CTL to as high a level as possible.
For example, the CTL contains declarations with the characteristics of
those found in high level languages so that name and property list
management problems are passed to the CTL compiler. This scheme enables
the mode of compilation, for example output in semi-compiled form or
loading for immediate execution, to be determined within the CTL rather
than within each translator."

(.NET CLR / Clang+LLVM anyone?)

But that paper http://comjnl.oxfordjournals.org/content/15/2/109.full.pdf
was written in October 1971.

Pardon me for raising a cynical eyebrow at most of the wonderful
"breakthroughs" that have been hyped over the nearly 43(!) years since
then - especially considering how much, much, much more powerful the
hardware is these days.

--
Paul

Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 5:26 PM   in response to: Paul Scott in response to: Paul Scott
Paul Scott wrote:

Anyway, "store" ("=>") was just another (right-to-left) operator, so
you could write

a + b => c * 2 + 1 => d

Very interesting - thanks.

--
SteveT
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 9, 2014 8:15 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Any language that would
require parentheses for such simple expressions would be pretty
confusing and probably not become very popular.

Not confusing. How are:

x = a + (b * c)
x = (a + b) * c

...confusing? They are totally explicit.

The confusion is that people get an error if they enter simple
expressions like:

  x = a + b * c;
  y = d + e + f;


People don't /expect/ to be forced to use parentheses to get the result
they want, or worse, to get an error on a very simple expression almost
every compiler can easily deal with in the way they expect it
(multiplication before addition). It violates the (IMO very important)
principle of least astonishment.

That is probably why almost all programming languages accept such
expressions and have some kind of operator precedence.

--
Rudy Velthuis (TeamB) http://www.teamb.com

"Why am I so good at playing bitches? I think it's because
I'm not a bitch. Maybe that's why Miss Crawford always plays
ladies." -- Bette Davis
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 9, 2014 10:24 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:

People don't expect to be forced to use parentheses to get the result
they want.......

But Rudy, that's going to be the USP of the marvellous new language
"Thascal", which is remarkably like Pascal apart from the use of curly
braces and the need for all operator precedence to be specified with
parentheses. Anybody who chooses Thascal will know what to expect.

:-)

--
SteveT
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 9, 2014 11:16 PM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:
Anybody who chooses Thascal will know what to expect.

I'm going to hold out for Thascal++. Of course, in an epic naming battle rivaled only by Linux vs. GNU/Linux, Thascal purists will insist it be called Thascal(+)(+) to make operator precedence clear. ;-)
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 10, 2014 3:00 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

Steve Thackery wrote:
Anybody who chooses Thascal will know what to expect.

I'm going to hold out for Thascal++. Of course, in an epic naming
battle rivaled only by Linux vs. GNU/Linux, Thascal purists will
insist it be called Thascal(+)(+) to make operator precedence clear.
;-)

LOL!! Of course, I was only joking about the curly brackets to get a
rise out of the usual suspects - in fact it will use white space
indenting like Python.

--
SteveT
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 11, 2014 2:54 PM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Rudy Velthuis (TeamB) wrote:

People don't expect to be forced to use parentheses to get the
result they want.......

But Rudy, that's going to be the USP of the marvellous new language
"Thascal", which is remarkably like Pascal apart from the use of curly
braces and the need for all operator precedence to be specified with
parentheses. Anybody who chooses Thascal will know what to expect.

Yes, IF anybody wants to use it at all. When will you finish it?

--
Rudy Velthuis (TeamB) http://www.teamb.com

"Whatever is begun in anger ends in shame."
-- Benjamin Franklin (1706-1790)

Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 28, 2014 12:54 PM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Rudy Velthuis (TeamB) wrote:

People don't expect to be forced to use parentheses to get the
result they want.......

But Rudy, that's going to be the USP of the marvellous new language
"Thascal", which is remarkably like Pascal apart from the use of curly
braces and the need for all operator precedence to be specified with
parentheses. Anybody who chooses Thascal will know what to expect.

:-)

I wish you a lot of luck with that. <g>


--
Rudy Velthuis (TeamB) http://www.teamb.com

"When you meet a worthy person, focus on reaching his level.
When you meet an unworthy person, take a good look inside
yourself."
-- Confucius

Anders Isaksson


Posts: 30
Registered: 4/15/00
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 10, 2014 7:36 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

I'm simply saying that mathematical precedence can itself be
obscure to some people

And it's one more thing to remember instead of seeing explicitly in
the code what's intended (or at least what's coded).

I definitely prefer explicit precedence.
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 11, 2014 2:52 PM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Rudy Velthuis (TeamB) wrote:

But it SHOULD compile. It is a normal mathematical expression, and
it should be possible to write those without enforcing precedence
with parentheses and without unexpected results.

That's if you assert that a mathematically valid expression should
also be valid to a compiler.

Yes, I assert that, to comply with the rule of least astonishment.

--
Rudy Velthuis (TeamB) http://www.teamb.com

"A terrorist is someone who has a bomb but can't afford an air
force."
-- William Blum
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 9, 2014 10:49 PM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:
Thus I often use
brackets even where they aren't necessary, simply to make it absolutely
explicit to the reader (myself, the following week) what was intended.

Oh sure, you should always make explicit anything that's ambiguous. But in the above case,

If x = 7 or a = 3 then

really isn't ambiguous.

The only way to read it other than

If (x = 7) or (a = 3)

is

If x = (7 or a) = 3

which is nonsensical. However, parentheses are still required in C and Delphi. Other languages tend to give the logic operators a lower precedence, which cuts down on all the parentheses. Of course

By the way, did I say Knuth when I meant Ritchie?

“Early C had no separate operators for & and && or | and ||....The precedence of & and | were as they are now. Primarily at the urging of Alan
Snyder, the && and || operators were added. This successfully separated the concepts of bit-wise operations and short-circuit Boolean
evaluation. However, I had cold feet about the precedence problems...In retrospect it would have been better to go ahead and change the
precedence of & to higher than ==, but it seemed safer just to split & and && without moving & past an existing operator. (After all, we had
several hundred kilobytes of source code, and maybe 3 installations....) ”

http://www.lysator.liu.se/c/dmr-on-or.html

I'd like to see, or at least try out, a language where there are no
precedence rules; by that, I mean that any statement where precedence
could be ambiguous must specify that precedence with brackets.

So technically one precedence rule, that everything is equal? I'm not clear how you would define "ambiguous".

Actually you got me thinking too - well, all the talk of parentheses got me thinking about LISP ;-) - and then I found this list of languages that don't have traditional operator precedence rules...

http://programmers.stackexchange.com/questions/3425/which-programming-languages-doesnt-use-operator-precedence-besides-lisp-like-la
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 10, 2014 3:01 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

So technically one precedence rule, that everything is equal? I'm not
clear how you would define "ambiguous".

That's exactly what I mean. Or rather, instead of saying everything is
equal, it would be everything is ambiguous. :-)

--
SteveT
Paul Scott

Posts: 33
Registered: 10/27/01
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 10, 2014 5:31 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph,

On Tue, 10 Jun 2014 06:49:46 +0100, Joseph Mitzen wrote:

Steve Thackery wrote:
Thus I often use
brackets even where they aren't necessary, simply to make it absolutely
explicit to the reader (myself, the following week) what was intended.

Oh sure, you should always make explicit anything that's ambiguous. But
in the above case,

If x = 7 or a = 3 then

really isn't ambiguous.

The only way to read it other than

If (x = 7) or (a = 3)

is

If x = (7 or a) = 3

which is nonsensical.

But what if that first line was just slightly different?

If x = 7 or 3 .....

and if those literals were replaced with identifiers?

If x = B or C .....

--
Paul
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 11, 2014 1:51 PM   in response to: Paul Scott in response to: Paul Scott
Paul Scott wrote:

But what if that first line was just slightly different?

If x = 7 or 3 .....

Then we'd need to change the language, because that's not valid in Pascal... or Python... or really any other language I can think of at the moment. In Pascal you'd say

If x in [3, 7] ....


unless your numbers were greater than 255 in which case you're out of luck. :-(

and if those literals were replaced with identifiers?

If x = B or C .....

Same as above. Not valid Pascal, and in a language with tuples you would write it as


If x in (B, C) .....
 
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 7, 2014 5:46 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

<snip>

You have mentioned a lot of good stuff, some less good and some that are just plain bad.

I don't have time to go line by line and cover all things you have mentioned, but I will concentrate
on some important parts where I completely disagree with you.

First, of course begin/end - you cannot change that - period. It would not be Pascal any more. Like
I have already said, changes and improvements to the language have to be withing some boundaries.
We are not designing brand new language here.

Next, separate interface and implementation sections. I consider that to be one of the core strengths
of Delphi. It makes clear cut between what is part of public API and what isn't. Not having that separation
is second thing on my "really hate" list when it comes to languages like C#, Java, PHP...(first being case
sensitivity).

I find reading code that has implementation parts sprinkled all over extremely difficult and time consuming.
There are some improvements needed in Delphi IDE that would make it easier to keep both sections in
sync, but both sections need to stay as they are. And BTW there is no need to go page up - down when
you want to find your method implementation, simple Ctrl+Click on identifier will do (sometimes it doesn't work,
but that is a bug that should be fixed).

Next, single string type. Having that is fine for some pure higher level languages, with Delphi you can also
get close to the metal, and such single abstraction is simply not enough in some cases. We need more
control and more options to be able to choose right type for the job. Not to mention existing codebases that
heavily depend on 8-bit string types where changes can result in code that no longer works within given
memory and speed requirements.

Dalija Prasnikar
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 9, 2014 11:46 PM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:
Joseph Mitzen wrote:

I don't have time to go line by line and cover all things you have mentioned, but I will concentrate
on some important parts where I completely disagree with you.

Definitely the most important things to concentrate on....

First, of course begin/end - you cannot change that - period. It would not be Pascal any more.

Do you really think that Pascal is defined by begin/end any more than C or C++ are defined by braces? They're just a small piece of syntax. Static typing, records, subtyping... there's so much more than could be said to be part of the core design of the language.

Like
I have already said, changes and improvements to the language have to be withing some boundaries.
We are not designing brand new language here.

By this boundary BASIC would never have lost its line numbers or gained structured programming concepts and would have died out decades earlier, something to think about.

Line numbers did not catch on in other languages. Neither did "begin..end". They've both become evolutionary dead ends and as such are things you really have to evaluate about keeping or not. A language that can't attract new users is going to go extinct.

Next, separate interface and implementation sections. I consider that to be one of the core strengths
of Delphi.

I consider it as something that no other non-clone language ever adopted in several decades which is powerful commentary on how useful people have found it.

It makes clear cut between what is part of public API and what isn't.

The best place for that is the actual documentation, or at least a naming convention.

I find reading code that has implementation parts sprinkled all over extremely difficult and time consuming.

But isn't that how it is now in Delphi? Even Eiffel makes an example of this in one of their promo videos. You have nothing but the name of a method in the interface section and may have to go ten pages down to find the implementation to understand what it actually does. Worse, it's only convention that requires the methods be implemented in the same order they appeared in the interface. Worse still, the implementation can have a different header than the interface and this will pass silently by the compiler!

Writing the method headers twice is a clear violation of Don't Repeat Yourself and the number one reason why we've never seen it anywhere else.

And BTW there is no need to go page up - down when
you want to find your method implementation, simple Ctrl+Click on identifier will do (sometimes it doesn't work,
but that is a bug that should be fixed).

So do we require everyone to buy a $1500 IDE when reading our code? What about when we put it on the web on a blog? The reality is splitting the class definition and its implementation does indeed lead to having to flip back and forth in the code to understand how a class works. Meanwhile, every programmer's editor I'm aware of have code folding built in if you wanted to collapse the methods and only see the headers (including some Javascript code viewers), but I don't know of one outside of the Delphi IDE that can jump around to locate Delphi methods.

I just don't think it's defensible.

type
    TMyClass = class(TObject)
       ...
       procedure DoSomething;
       ...
    end;


I just don't see how we can argue that one should have to scroll down the page to find out what DoSomething actually does.


Next, single string type. Having that is fine for some pure higher level languages, with Delphi you can also
get close to the metal, and such single abstraction is simply not enough in some cases. We need more
control and more options to be able to choose right type for the job.

I've got no desire to argue this again. :-) A string is a collection of characters. What you and others really want is a powerful container to manipulate bytes, not characters. I think I left that off of my list but I know it's on my original. With something more powerful than "array of byte" that behaves like a list and a string you'll have the ability to manipulate bytes and the string type can remain singular (as it is in swift, by the way).

I appreciate your response to my list. I'm not sure either of us convinced the other, but I heard your concerns. For my part, I was not terribly concerned about backwards compatibility because I know there is zero chance of anyone at EMBT ever even seeing my list, much less doing anything about it. :-)
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 10, 2014 3:08 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

I know there is zero chance of anyone at EMBT ever even seeing my
list, much less doing anything about it. :-)

Dead right, and I don't think that is the purpose of this discussion.

Rather, it is very instructive to shine the spotlight on Delphi and
various other languages and compare them. It's an enjoyable pastime
that stimulates new ideas, gives us new insights, and teaches us things
we didn't know. We can inject a little humour here and there, and just
chat together like buddies do.

--
SteveT
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 10, 2014 5:13 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
We agree to disagree ;-)

Dalija Prasnikar
Asbjørn Heid

Posts: 267
Registered: 11/12/12
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 7, 2014 1:13 PM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

Unfortunately I don't have time right now to go into all the details I'd like, I'll just jump on a few things that really stood out to me.

Asbjørn Heid wrote:

IMO there are many things "missing" from the Delphi language and compiler. My top list for language features are
- a conditional operator, x := if (a > 5) then 3 else 4;

Definitely. Python switches the syntax a bit from your example, e.g.

x = 3 if a > 5 else 4

which might be a little clearer.

Please, no. I find that horrible, and absolutely not clear at all. Yes it reads a bit more like English, but the problem is that it makes the (mental) parsing considerably worse. My suggestion immediately tells you what's going on, and then it keeps the possible output values together so you don't have to look back and forth to figure out what the expression returns.

- inline, scoped variable declaration, var x: integer := 42;

I'd go farther and suggest that type inference is absolutely necessary (I can't find one statically typed language created from 2000 onwards that doesn't have it).

Type inference would be nice, though I suspect it'll be a while before we get that...

record helpers that don't replace existing ones

Oh yes!

get rid of begin...end

Well, as much as I'm for something else, I prefer consistency, and getting rid of that is something that should have been done 30 years ago or more.

a better order of precedence for operations

Agreed.

a consistent operator that checks for membership, i.e. "in". "In" should work for everything: sets, dictionaries, arrays, strings, etc. I'd like to feel like the language was designed and not completely ad-hoc

The "in" operator can be overloaded, so that the standard delphi generic containers don't do it is just laziness. And this brings up another point, why can't record helpers overload operators?.

iteration through database results, among many other things. Iteration EVERYWHERE and recognizing it as a programming paradigm would be best

This can be solved in a library, but would be nice to have in Delphi itself.

Named parameters. They allow for elegant APIs and clear code and once you use them it's hard to do without them. Take a look at the Dateutils unit if you want to see the nightmare that results without them.

Would be nice, not sure what an acceptable syntax would be though.

multiple assignment: x, y, z := 1, 2, 3. Also x := y := z := 0 and a, b := b, a.

I just don't see this fitting in Delphi. I know you like Python, but there's no need to make a bastard child :P

List (and dict and set) comprehensions.

This is a very powerful thing in for example Python. I'd have to think about how it'd fit in Delphi though. Given how "for..in" works and that we have anonymous methods, we're not far away, should be mostly sugar.

Get rid of anonymous functions. They make zero sense in a language that has nested functions. There's no difference between

whatever := Function(x, y: Integer): Integer;....


and
Function whatever(x, y: Integer): Integer;.....

I strongly disagree, and there is actually a huge difference: an anonymous function carries state, in the form of captured variables, while a nested function simply shares stack with the parent function. The stack is of course invalid when the function returns.

As such you can use an anonymous function to return a non-constant functional[1], something you cannot do directly with a nested function.

[1]: http://en.wikipedia.org/wiki/Functional_%28mathematics%29

- Asbjørn

Edited by: Asbjørn Heid on Jun 7, 2014 1:15 PM
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 11, 2014 12:50 PM   in response to: Asbjørn Heid in response to: Asbjørn Heid
Asbjørn Heid wrote:

Please, no. I find that horrible, and absolutely not clear at all. Yes it reads a bit more like English

Perhaps being a native English speaker this explains why I find it more appealing. :-) I actually did become excited about the ternary operator (as I believe it's called) when I had an algorithm for computing a score, part of which I had written down like this:

"The new score is found by dividing the score by the high score if the score is less than the high score otherwise by the next highest score..."

and found I could express it in Python as

new_score = score / (high_score if score < high_score else next_highest) ....

which I realized was essentially exactly how I'd written it in English. Cool. :-)

But either way, in my opinion, is better and clearer than the "?" notation many languages use. It's also the case that Python delayed the ternary operator for years because of fights over syntax :-) so obviously it's a contentious issue. But again, I'll take what I can get for Delphi (the IfThen function is a poor substitute).

I'd go farther and suggest that type inference is absolutely necessary (I can't find one statically typed language created from 2000 onwards that doesn't have it).

Type inference would be nice, though I suspect it'll be a while before we get that...

True, but I fear it's becoming so expected now (and even other older languages are adding it or are drafting standards to add it) that it's going to become an expected feature soon in statically typed languages. It's really going to be hard to call the product "RAD" studio and still not have features like this. You're also going to have kids coming up through school who are going to have been taught with languages with type inference and it will be a culture shock needing to specify all the types explicitly. In that sense it's not the most important feature technically but it seems very important to me culturally and marketing wise.

record helpers that don't replace existing ones

Oh yes!

There are SO MANY odd rules in the language that appear to trace back to "optimizations" in the compiler or other implementation details (and I hope will go away when they move to LLVM). You can't use a 64bit integer as the counter of a for loop in the 64bit compiler and you can't use a variable in a closure in a for loop (thanks to "optimizations", which is a euphemism for "ugly hack everyone's afraid to touch"). This record helper issue is just another one on a long list.

get rid of begin...end

Well, as much as I'm for something else, I prefer consistency, and getting rid of that is something that should have been done 30 years ago or
more.

If they can have a compiler switch for 0 or 1 based strings, they can have a switch to use a new syntax. :-) Seriously, I think Haskell did it, creating an optional mode with Python-style significant indentation.

a consistent operator that checks for membership, i.e. "in". "In" should work for everything: sets, dictionaries, arrays, strings, etc. I'd like to feel like the language was designed and not completely ad-hoc

The "in" operator can be overloaded, so that the standard delphi generic containers don't do it is just laziness.

Besides the weird rules/exceptions that are caused by ancient "optimizations", this is a related cause of many of the things that irritate me about the language today. When they add new features they never, ever go back throughout the VCL and implement those features everywhere! That's the cause of this problem and several others. Heck, we have Pos and PosEx. I believe that PosEx was added in D7... and optional parameters in D6. There was no need for PosEx; Pos just needed a new, optional parameter for the start location. Complex numbers in Delphi predate records with methods so they're an awful LISP-like bundle of functions to use. Now I believe Marco created a modern complex number implementation with records/methods (and thus operator overloading) but it's hidden in the samples collection, which I assume means it's undocumented and unsupported. :-( There are things like this all over the place where things would be a lot nicer if they just polished the code and propagated new features throughout the VCL.

And this brings up another point, why can't record helpers overload operators?.

Allan Bauer once replied on his blog during a comment discussion with him about possible new features for Delphi something like "It should be understand that every feature I talk about has to be demonstrated to increase the bottom line to get approved...." Basically, that the accountants/marketing/management want to know if a feature is going to sell more copies of Delphi or not. That's probably the explanation for the reason many things are the way they are, including long-standing IDE issues, while they keep adding more mobile stuff (although XE6 finally fixed a lot of outstanding bugs).

Named parameters. They allow for elegant APIs and clear code and once you use them it's hard to do without them. Take a look at the Dateutils unit if you want to see the nightmare that results without them.

Would be nice, not sure what an acceptable syntax would be though.

Technically, it's already doable, but it involves messy hacks with interfaces and variants:

http://stackoverflow.com/questions/885942/named-optional-parameters-in-delphi

If I have a function

Function Whatever(a, b: Integer, c: Real:= 5.6): Integer;

I should be able to call it like

Whatever(a := 3, b:= 2)

multiple assignment: x, y, z := 1, 2, 3. Also x := y := z := 0 and a, b := b, a.

I just don't see this fitting in Delphi. I know you like Python, but there's no need to make a bastard child :P

The bastard child is Nimrod. :-)

How does it "not fit in"? It's somewhat natural if you're going to add tuples because of packing and unpacking. In oxygene if you have a tuple:

var t: tuple of (String, Int32, Boolean);


you can do this:
var s: String;
var i: Int32;
(s, i) := t;


Lots of Delphi functions end up changing parameters in order to pass back multiple values, which is a design no-no (one can't tell from looking at the function call that the parameter is changing). With tuples and automatic packing/unpacking if you wanted to return coordinates the function could just return a tuple and the call could be:

lat, long = Coords('Paris');

What about splitting a string? If I want the first and last name, splitting the string into an array and then copying each element of the array out into individual variables in ridiculous. With unpacking you could just write

first_name, last_name := some_name.split(' ');

The bigger the split string, the more painful it is that we don't have this feature. When I think back now over all the text processing code I wrote back in the day (a lot of it in Delphi 5, before we even had a split function or PosEx) I almost want to cry. Now I've been processing sports score/record data from the internet and I can do things like this in python:

if data is "7-4-2-1":

wins, losses, draws, DQs = data.split('-')


Actually if I wanted it as integers rather than strings I could use list comprehensions and still do it in one step:


wins, losses, draws, DQs = [int(score) for score in data.split('-')]
 


In Delphi with no type inference, tuples, or argument packing/unpacking I'd need to do:


Var
  wins, losses, draws, DQs : Integer;
  tempScores : Array Of String;
  data : String;
 
.... (*score string gets into 'data'*)....
 
  temp_scores := data.split('-');
  wins := StrToInt(temp_scores[0]);
  losses := StrToInt(temp_scores[1]);
  draws := StrToInt(temp_scores[2]);
  DQs := StrToInt(temp_scores[3]);
 


Of course, once we drop down into algorithm mode (thinking about how to do something rather than what we want to do), we have to start considering other options, readability, performance, etc. Maybe I want another array of integer instead, loop through the string array and convert the values to integers, then assign the final values out of that? Is that more readable? I'm not sure.

Meanwhile, with comprehensions and unpacking and type inference, you'd just be able to write what you wanted and move right along:


var wins, losses, draws, DQs := [StrToInt(score) for score in data.split('-')];
 


or something like that. Getting back to the "RAD" Delphi used to be all about.


List (and dict and set) comprehensions.

This is a very powerful thing in for example Python. I'd have to think about how it'd fit in Delphi though.

Comprehensions, LINQ, or something else: we need a structure for doing filter/map/reduce operations in a simple fashion in Delphi.

Interestingly, Craig Stuntz and another Delphi user proposed comprehensions for Delphi in QC back in 2008 and even came up with a syntax after a lot of debate. Unfortunately, not one word was ever heard from EMBT on this idea. :-(

Here we go:

http://qc.embarcadero.com/wc/qcmain.aspx?search=1&first=m.&last=Th.

Is "m. th." Michael Thuma? Whoever this person is, it turns out they've proposed lots of the features I mention here, which I wasn't aware of. None have been adopted obviously.


Get rid of anonymous functions. They make zero sense in a language that has nested functions. There's no difference between

whatever := Function(x, y: Integer): Integer;....


and
Function whatever(x, y: Integer): Integer;.....

I strongly disagree, and there is actually a huge difference: an anonymous function carries state, in the form of captured variables,

Do you mean "can carry state"? If you're using an anonymous function to write a custom comparator function in the middle of a call to a sorting function, you're not carrying state, you're just making a big, unreadable mess. Far more readable (if we could define nested functions anywhere) to define a function right before the function call and then pass it in. Look at the nightmare code examples on this page to see what I mean:

http://thundaxsoftware.blogspot.com/2012/03/fluent-interfaces-example-using-delphi.html

while a nested function simply shares stack with the parent function. The stack is of course invalid when the function returns.

This is a Delphi implementation problem. We're supposed to have first class functions. A nested function should not be behaving any differently otherwise it's not really first class.

We should be able to do:

Function MakePrinter(msg: String): Function;
    Function printer: String;
        Begin
            WrlteLn(msg);
        End;
Begin
         result := printer;
End;
 
print := MakePrinter("Hello");
 


Then calling print should print "Hello". Simple. Use what we already have. No need to create a new class of quasi-functions. And I didn't even get into the C#/Python "yield" keyword. :-)

As such you can use an anonymous function to return a non-constant functional[1], something you cannot do directly with a nested function.

That's because there's something wrong with our implementation of nested function. From an API standpoint, it's not consistent.

Great read and thanks for replying to my giant post!

Quentin Correll


Posts: 2,412
Registered: 12/1/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 11, 2014 1:46 PM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph,

| Great read and thanks for replying to my giant post!

And this one was another. ;-)

--

Q

06/11/2014 13:45:57

1.19.1.372 [Q'sBrokenToolBar] [Running on TQ]

Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 6:43 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

- a conditional operator, x := if (a > 5) then 3 else 4;

Definitely. Python switches the syntax a bit from your example, e.g.

x = 3 if a > 5 else 4

which might be a little clearer.

Actually no, it is A LOT LESS clear than his example. The condition
comes AFTER the first alternative but BEFORE the second one. That
doesn't make any sense at all.

Actually, putting an if clause AFTER an expression is very confusing
and I really wonder why they introduced that in Python.

--
Rudy Velthuis (TeamB) http://www.teamb.com

"Barab·si's Law of Programming: Program development ends when the
program does what you expect it to do ó whether it is correct or
not." -- Albert-L·szlÛ Barab·si
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 11, 2014 2:12 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:

Actually no, it is A LOT LESS clear than his example.

Apparently there were epic fights about this that held up the implementation for years. It was decided by saying "Let Guido make the call." And Guido sometimes makes... interesting calls. :-) Actually, I just read the Python Enhancement Proposal on this and they actually did weighted voting of 17 different syntax options!

http://legacy.python.org/dev/peps/pep-0308/

The condition
comes AFTER the first alternative but BEFORE the second one. That
doesn't make any sense at all.

It makes sense in English at least. "Take the highway if there's no traffic otherwise take the local roads."

"This form invites considering x as the normal value and y as an exceptional case. " - Wikipedia

I don't see that it "makes no sense at all." It's different. It reads like English to me. I don't see it as better or worse than a lot of other options. I think it' was better than introducing a "?" operator or new keywords at least.

Actually, putting an if clause AFTER an expression is very confusing
and I really wonder why they introduced that in Python.

You can check out PEP 308, but the answer really seems to hinge on years of debating 17 different syntax options... plus write-in votes and votes for *none of the above*! :-)

Come to think of it though you can also chain it....

x = 7 if a == 3 else 9 if a == 2 else 0

Also, Python doesn't have a "then" keyword (just a colon) so perhaps it's also better this way to avoid introducing another keyword or putting colons in the middle of statements.
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 10:51 AM   in response to: Stewart Gaskell in response to: Stewart Gaskell
Stewart Gaskell wrote:

Being a C++ and C# kinda chap I like the short and curlies, but don't
begrudge the begin...end of Delphi.

Four!! (I'm gonna count that as four, anyway.)

We've got you begin/end-ers on the run, I reckon!

--
SteveT

Van Swofford

Posts: 397
Registered: 6/28/03
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 12:25 PM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Stewart Gaskell wrote:

Being a C++ and C# kinda chap I like the short and curlies, but
don't begrudge the begin...end of Delphi.

Four!! (I'm gonna count that as four, anyway.)

We've got you begin/end-ers on the run, I reckon!

LOL! Run for your lives, the } is near.

--
Cheers,
Van

"Good judgment comes from experience, and a lot of that comes from bad
judgment." - Will Rogers
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 2:58 PM   in response to: Van Swofford in response to: Van Swofford
Van Swofford wrote:

LOL! Run for your lives, the } is near.

Yay! Kaboom, tish!

--
SteveT
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 6:47 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Stewart Gaskell wrote:

Being a C++ and C# kinda chap I like the short and curlies, but
don't begrudge the begin...end of Delphi.

Four!! (I'm gonna count that as four, anyway.)

We've got you begin/end-ers on the run, I reckon!

In a Delphi forum? Sure, sure.

--
Rudy Velthuis (TeamB) http://www.teamb.com

"One word sums up probably the responsibility of any Governor,
and that one word is 'to be prepared'." -- George W. Bush
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 2:30 AM   in response to: Asbjørn Heid in response to: Asbjørn Heid
Asbjørn Heid wrote:
Steve Thackery wrote:
Van Swofford wrote:

As for me, I prefer curly braces, but begin..end are fine. Just a
matter of convention.

Hooray! That's two of us who prefer curly braces!

I used to strongly dislike curly braces, after having learned programming in pascal, and used it for many years. But after a recent stint in C++, I've grown to prefer them.

Ok guys, I am running out of pillows here ;-)

Dalija Prasnikar
Asbjørn Heid

Posts: 267
Registered: 11/12/12
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 3:09 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:
Asbjørn Heid wrote:
I used to strongly dislike curly braces, after having learned programming in pascal, and used it for many years. But after a recent stint in C++, I've grown to prefer them.

Ok guys, I am running out of pillows here ;-)

For me it's that the begin/end adds too much "visual clutter". With curly braces I find it easier to distinguish the "interesting" keywords, for if while etc.

Then again, I'm not advocating Delphi to move to curly braces or any such thing.

- Asbjørn
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 4:47 AM   in response to: Asbjørn Heid in response to: Asbjørn Heid
Asbjørn Heid wrote:
Dalija Prasnikar wrote:
Asbjørn Heid wrote:
I used to strongly dislike curly braces, after having learned programming in pascal, and used it for many years. But after a recent stint in C++, I've grown to prefer them.

Ok guys, I am running out of pillows here ;-)

For me it's that the begin/end adds too much "visual clutter". With curly braces I find it easier to distinguish the "interesting" keywords, for if while etc.

With bolded keywords begin/end stick out perfectly, although I have to admit that with
help of vertical indent guides I can live with curly braces just fine.

Or to put it in another way, curly braces are last on the list of things that bother
me in other languages.

Dalija Prasnikar
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 5:05 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:

Or to put it in another way, curly braces are last on the list of
things that bother me in other languages.

Or to put it my way, 'begin' and 'end' are the first on the list of
things that bother me in Pascal. :-)

--
SteveT
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 5:26 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:
Dalija Prasnikar wrote:

Or to put it in another way, curly braces are last on the list of
things that bother me in other languages.

Or to put it my way, 'begin' and 'end' are the first on the list of
things that bother me in Pascal. :-)

LOL

Dalija Prasnikar
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 5:04 AM   in response to: Asbjørn Heid in response to: Asbjørn Heid
Asbjørn Heid wrote:

For me it's that the begin/end adds too much "visual clutter". With
curly braces I find it easier to distinguish the "interesting"
keywords, for if while etc.

Yes, yes, yes! I've been saying this very thing for years!

--
SteveT
Arthur Hoornweg

Posts: 414
Registered: 6/2/98
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 17, 2014 7:17 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Yes, yes, yes! I've been saying this very thing for years!

I would rather have the option that the IDE uses user-defined colors for individual reserved words such as Begin/End. Then everyone would have the possibility to reduce or enhance their visibility.
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 1:28 PM   in response to: Asbjørn Heid in response to: Asbjørn Heid
Asbjørn Heid wrote:

Dalija Prasnikar wrote:
Asbjørn Heid wrote:
I used to strongly dislike curly braces, after having learned
programming in pascal, and used it for many years. But after a
recent stint in C++, I've grown to prefer them.

Ok guys, I am running out of pillows here ;-)

For me it's that the begin/end adds too much "visual clutter".

For me it is that hardly visible curly braces do not provide enough
visual presence. And if these bloody curlies are used in a terribly
ugly style, like in the Swift examples:

if bla {
yadayada(1, 2, 3)
} else {
yadadoodle(17)
}

If I see code like that (especially the line with else), my toenails
curl upwards. Yuk!

--
Rudy Velthuis (TeamB) http://www.teamb.com

"I'm always amazed to hear of air crash victims so badly
mutilated that they have to be identified by their dental
records. What I can't understand is, if they don't know who
you are, how do they know who your dentist is?"
-- Paul Merton

Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 1:58 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:
Asbjørn Heid wrote:

Dalija Prasnikar wrote:
Asbjørn Heid wrote:
I used to strongly dislike curly braces, after having learned
programming in pascal, and used it for many years. But after a
recent stint in C++, I've grown to prefer them.

Ok guys, I am running out of pillows here ;-)

For me it's that the begin/end adds too much "visual clutter".

For me it is that hardly visible curly braces do not provide enough
visual presence. And if these bloody curlies are used in a terribly
ugly style, like in the Swift examples:

if bla {
yadayada(1, 2, 3)
} else {
yadadoodle(17)
}

If I see code like that (especially the line with else), my toenails
curl upwards. Yuk!

+1

I always put braces in their own line.

Dalija Prasnikar
Van Swofford

Posts: 397
Registered: 6/28/03
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 2:24 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:

Asbjørn Heid wrote:

Dalija Prasnikar wrote:
Asbjørn Heid wrote:
I used to strongly dislike curly braces, after having learned
programming in pascal, and used it for many years. But after a
recent stint in C++, I've grown to prefer them.

Ok guys, I am running out of pillows here ;-)

For me it's that the begin/end adds too much "visual clutter".

For me it is that hardly visible curly braces do not provide enough
visual presence. And if these bloody curlies are used in a terribly
ugly style, like in the Swift examples:

if bla {
yadayada(1, 2, 3)
} else {
yadadoodle(17)
}

If I see code like that (especially the line with else), my toenails
curl upwards. Yuk!

Agreed! That's just wrong...

--
Cheers,
Van

"Good judgment comes from experience, and a lot of that comes from bad
judgment." - Will Rogers
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 2:14 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:

if bla {
yadayada(1, 2, 3)
} else {
yadadoodle(17)
}

Totally agree: those left braces are in totally the wrong place. They
should be on their own line:

if bla
{
yadayada(1, 2, 3)
}
else
{
yadadoodle(17)
}

........ and the compiler plus any auto-correct should enforce that.

--
SteveT
Don Delegate

Posts: 18
Registered: 9/25/08
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 4:55 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Rudy Velthuis (TeamB) wrote:

if bla {
yadayada(1, 2, 3)
} else {
yadadoodle(17)
}

Totally agree: those left braces are in totally the wrong place. They
should be on their own line:

if bla
{
yadayada(1, 2, 3)
}
else
{
yadadoodle(17)
}

........ and the compiler plus any auto-correct should enforce that.

Why not just:

if bla then
yadayada(1, 2, 3)
else
yadadoodle(17)
endif

Problem solved?

Kind regards,
D.

Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 10:55 AM   in response to: Don Delegate in response to: Don Delegate
Don Delegate wrote:

Why not just:

if bla then
yadayada(1, 2, 3)
else
yadadoodle(17)
endif


Why yes, that's what at least two of us have been saying about Python.
If you enforce indentation then block delimiters are superflous.

I was simply saying that if you must use delimiters, then curly braces
are better, but in all cases they really must be on their own line and
that would be enforced by the compiler IIHMY (if I had my way!).

--
SteveT
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 7, 2014 1:33 PM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Don Delegate wrote:

Why not just:

if bla then
yadayada(1, 2, 3)
else
yadadoodle(17)
endif


Why yes, that's what at least two of us have been saying about Python.
If you enforce indentation then block delimiters are superflous.

The indentation is irrelevant. The then, else and endif keywords
delimit the blocks. There is no forced indentation. So this would
compile too, but would just not be as readable:

if bla then
yadayada(1, 2, 3);
// some more code here
else
yadadadoodle(17);
// some extra code here
end

The first block is delimited by then-else, the second by else-end. Of
course the indentd version is more readable, but it is not enforced:

if bla then
yadayada(1, 2, 3);
// some more code here
else
yadadadoodle(17);
// some extra code here
end

As I said, I like it. I would remove all begins and quite a few of the
ends. The disadvantage is that the "end" is also required for
non-compound statements ("single line blocks").
--
Rudy Velthuis (TeamB) http://www.teamb.com

"Would you like to liberate yourself from the lower realms of
life? Would you like to save the world from the degradation and
destruction it seems destined for? Then step away from shallow
mass movements and quietly go to work on your own
self-awareness."
-- Lao tzu
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 7, 2014 1:39 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:

As I said, I like it. I would remove all begins and quite a few of the
ends.

Hey, Rudy, I think you should consider becoming a Python advocate! :-)

--
SteveT
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 7, 2014 1:56 PM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Rudy Velthuis (TeamB) wrote:

As I said, I like it. I would remove all begins and quite a few of
the ends.

Hey, Rudy, I think you should consider becoming a Python advocate!
:-)

No, because I don't like forced indentation, i.e. that code actually
RELIES on the indentation to function at all. Indentation and all other
formatting should be completely free. In the if-then-else-end version,
indentation is totally irrelevant.

And if I'd have to use a language with forced indentation, it would not
be Python, it would be Ruby.

--
Rudy Velthuis (TeamB) http://www.teamb.com

"How can I lose to such an idiot?"
-- A shout from chessmaster Aaron Nimzovich (1886-1935)
Quentin Correll


Posts: 2,412
Registered: 12/1/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 7, 2014 3:47 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy,
Rudy Velthuis (TeamB) wrote:

| ...because I don't like forced indentation, ...

+ 1,000 - It's an absolute DISASTER!!!

Q

Asbjørn Heid

Posts: 267
Registered: 11/12/12
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 7, 2014 3:56 PM   in response to: Quentin Correll in response to: Quentin Correll
Quentin Correll wrote:
Rudy,
Rudy Velthuis (TeamB) wrote:

| ...because I don't like forced indentation, ...

+ 1,000 - It's an absolute DISASTER!!!

Have you guys actually tried to write a non-trivial amount of Python code?

I've used Python for several years in a 60kLOC Python project, and it's just never been any issue at all for me.

- Asbjørn
Bruce McGee

Posts: 1,716
Registered: 9/30/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 7, 2014 6:16 PM   in response to: Asbjørn Heid in response to: Asbjørn Heid
Asbjørn Heid wrote:

Have you guys actually tried to write a non-trivial amount of Python
code?

I've used Python for several years in a 60kLOC Python project, and
it's just never been any issue at all for me.

I've managed to write a fair amount of code that uses squiggly brackets
and even some forced indentation.

Just like it's possible to write non-trivial software using Visual
Basic.

These just aren't my first choice.

--
Regards,
Bruce McGee
Glooscap Software

Quentin Correll


Posts: 2,412
Registered: 12/1/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 7, 2014 7:43 PM   in response to: Asbjørn Heid in response to: Asbjørn Heid
Asbjørn,

| Have you guys actually tried to write a non-trivial amount of Python
| code?

No. Wouldn't waste my time. JMPO.

--
Q

Bruce McGee

Posts: 1,716
Registered: 9/30/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 7:01 AM   in response to: Quentin Correll in response to: Quentin Correll
Quentin Correll wrote:

Asbjørn,

Have you guys actually tried to write a non-trivial amount of
Python code?

No. Wouldn't waste my time. JMPO.

Think of it as just another tool in the tool box.

At the very least, scripting languages are always useful for gluing
things together or automating tasks.

--
Regards,
Bruce McGee
Glooscap Software
Quentin Correll


Posts: 2,412
Registered: 12/1/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 9:33 AM   in response to: Bruce McGee in response to: Bruce McGee
Bruce,

| Think of it as just another tool in the tool box.

I already have too many unused tools in my toolbox. <g>

--
Q
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 6:22 AM   in response to: Asbjørn Heid in response to: Asbjørn Heid
Asbjørn Heid wrote:

Quentin Correll wrote:
Rudy,
Rudy Velthuis (TeamB) wrote:

...because I don't like forced indentation, ...

+ 1,000 - It's an absolute DISASTER!!!

Have you guys actually tried to write a non-trivial amount of Python
code?

I've used Python for several years in a 60kLOC Python project, and
it's just never been any issue at all for me.

I'm sure one can get used to it, just like one can get used to the
peculiarities of C, C++ etc. But I don't like it and have the strong
conviction that a language should not depend on formatting.
--
Rudy Velthuis (TeamB) http://www.teamb.com

"A computer makes it possible to do, in half an hour, tasks which
were completely unnecessary to do before."
Quentin Correll


Posts: 2,412
Registered: 12/1/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 9:33 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy,

| I'm sure one can get used to it, just like one can get used to the
| peculiarities of C, C++ etc. But I don't like it and have the strong
| conviction that a language should not depend on formatting.

Redundant ditto.

--
Q

Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 11, 2014 2:23 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:
Indentation and all other
formatting should be completely free.

And yet we have style guides and recognize its necessity?

In the if-then-else-end version,
indentation is totally irrelevant.

Irrelevant to the compiler, yet still essential for development, so you're going to be doing it anyway.

And if I'd have to use a language with forced indentation, it would not
be Python, it would be Ruby.

Ruby doesn't have significant indentation. It does have the "end" keyword like you've shown here. But we all know you're itching to create your own language, "Rudy", anyway! :-)
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 28, 2014 1:57 PM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

Rudy Velthuis (TeamB) wrote:
Indentation and all other
formatting should be completely free.

And yet we have style guides and recognize its necessity?

Style guides should matter for the human READER of code, not for the
compiler. And different companies might prefer different style guides
with different indentation styles, which is made very hard, if not
impossible, by ENFORCED indentation.

In the if-then-else-end version,
indentation is totally irrelevant.

Irrelevant to the compiler, yet still essential for development, so
you're going to be doing it anyway.

I should not be forced to do it. Code should also compile if
indentation is not perfect. Proper code could even be compressed to a
one-liner and still compile. If I want proper indentation, for the
human readers of my code, I run a formatter over it: takes me a few
seconds, instead of constantly having to be on my toes to get
indentation right.

--
Rudy Velthuis (TeamB) http://www.teamb.com

"You exist only in what you do."
-- Federico Fellini
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 28, 2014 2:02 PM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

Rudy Velthuis (TeamB) wrote:
Indentation and all other
formatting should be completely free.

And yet we have style guides and recognize its necessity?

In the if-then-else-end version,
indentation is totally irrelevant.

Irrelevant to the compiler, yet still essential for development, so
you're going to be doing it anyway.

And if I'd have to use a language with forced indentation, it would
not be Python, it would be Ruby.

Ruby doesn't have significant indentation. It does have the "end"
keyword like you've shown here.

Sorry, I confused it with Python (reading too much Pygments = Python
and Jekyll = Ruby code, I guess).

I actually like blocks delimited by end (but no begin) and other
keywords, like "if ... then ... else ... end". No forced indentation,
and still not too many begin-end combinations.
--
Rudy Velthuis (TeamB) http://www.teamb.com

"Wherever there is great property, there is great inequality,
for one very rich man; there must be at least five hundred
poor."
-- Adam Smith
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 11, 2014 2:18 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:

The indentation is irrelevant.

Not to me - I found the original example without any indentation hard to read!

The then, else and endif keywords
delimit the blocks. There is no forced indentation. So this would
compile too, but would just not be as readable:

if bla then
yadayada(1, 2, 3);
// some more code here
else
yadadadoodle(17);
// some extra code here
end

I'm not sure the use of "just" is... er.... justified. Elses or not without indentation it's hard to be clear what's going on (especially for longer if statements). Worse, you could end up with inaccurate indentation that lies to you. It compiles but you still need indentation for the human, which still brings up the question of why not just use indentation and have one delimiter for both.


The first block is delimited by then-else, the second by else-end. Of
course the indentd version is more readable, but it is not enforced:

if bla then
yadayada(1, 2, 3);
// some more code here
else
yadadadoodle(17);
// some extra code here
end

As I said, I like it. I would remove all begins and quite a few of the
ends. The disadvantage is that the "end" is also required for
non-compound statements ("single line blocks").

It certainly works and is a step in the right direction... you just have to be nudged to go the rest of the way and get rid of all of them! ;-)
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 28, 2014 2:03 PM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

Rudy Velthuis (TeamB) wrote:

The indentation is irrelevant.

Not to me - I found the original example without any indentation hard
to read!

You're a human. You are not a compiler. To the compiler, it should not
matter.

--
Rudy Velthuis (TeamB) http://www.teamb.com

"Pray, v.: To ask that the laws of the universe be annulled on
behalf of a single petitioner confessedly unworthy."
-- Ambrose Bierce (1842-1914)
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 7, 2014 1:26 PM   in response to: Don Delegate in response to: Don Delegate
Don Delegate wrote:

Why not just:

if bla then
yadayada(1, 2, 3)
else
yadadoodle(17)
endif

Problem solved?


That's, for instance, more or less Modula-2 style (well, just "end"
would do). I actually like it. But I would prefer ; as separators. <g>

--
Rudy Velthuis (TeamB) http://www.teamb.com

"Many a man's reputation would not know his character if they
met on the street." -- Elbert Hubbard (1856-1915)
Arthur Hoornweg

Posts: 414
Registered: 6/2/98
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 17, 2014 7:18 AM   in response to: Don Delegate in response to: Don Delegate
Don Delegate wrote:

Why not just:

if bla then
yadayada(1, 2, 3)
else
yadadoodle(17)
endif

That's BASIC! YUK!

Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 7, 2014 1:24 PM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Rudy Velthuis (TeamB) wrote:

if bla {
yadayada(1, 2, 3)
} else {
yadadoodle(17)
}

Totally agree: those left braces are in totally the wrong place.

Indeed. They should only be used for multiline comments. <g>
--
Rudy Velthuis (TeamB) http://www.teamb.com

"In this world, nothing is certain but death and taxes."
-- Benjamin Franklin.
John Treder

Posts: 349
Registered: 8/2/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 4, 2014 8:57 PM   in response to: Van Swofford in response to: Van Swofford
Van Swofford wrote:

Then there are the few remaining old timers like me that still use vi

Argh. Once upon a time when I worked at a company that no longer exists, I had to learn vi because I kept crashing their unix servers, so they "gave" me a "private' server and su and all that stuff, so I could fix what I broke myself.
My job wasn't programming, it was mechanical engineering.
So when I left that company, several months before it became absorbed, I promptly and thankfully forgot all I knew of vi.
unix, however, has interesting possibilities. I could play in unix, if it did all the Windows stuff and had Delphi for my retirement sandbox.
I've been retired for OMG! 15 years now.

--
Tredmill
Van Swofford

Posts: 397
Registered: 6/28/03
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 7:31 AM   in response to: John Treder in response to: John Treder
John Treder wrote:

Van Swofford wrote:

Then there are the few remaining old timers like me that still use
vi

Argh. Once upon a time when I worked at a company that no longer
exists, I had to learn vi because I kept crashing their unix servers,
so they "gave" me a "private' server and su and all that stuff, so I
could fix what I broke myself. My job wasn't programming, it was
mechanical engineering. So when I left that company, several months
before it became absorbed, I promptly and thankfully forgot all I
knew of vi. unix, however, has interesting possibilities. I could
play in unix, if it did all the Windows stuff and had Delphi for my
retirement sandbox. I've been retired for OMG! 15 years now.

Yeah, I understand where you're coming from. I was an aerodynamics
engineer, and we got a bunch of Unix boxes for our group servers. vi
was the only editor. I hated it, and started campaigning to get
another editor. My boss got wind of it and sent me a none-too-subtle
message to just shut-the-f*** up and get on with things. So I trained
my finger-brain coordination system for vi, and now it is 25 years
later, and my fingers only speak vi on the keyboard. These dang
editors that require a mouse are killing me! kkkkhhhdw.. oops... :-)

--
Cheers,
Van

"Good judgment comes from experience, and a lot of that comes from bad
judgment." - Will Rogers
Jouni Aro

Posts: 86
Registered: 9/4/97
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 11:03 AM   in response to: Van Swofford in response to: Van Swofford
On 05/06/14 17:31, Van Swofford wrote:
John Treder wrote:

Van Swofford wrote:

Then there are the few remaining old timers like me that still use
vi

Argh. Once upon a time when I worked at a company that no longer
exists, I had to learn vi because I kept crashing their unix servers,
so they "gave" me a "private' server and su and all that stuff, so I
could fix what I broke myself. My job wasn't programming, it was
mechanical engineering. So when I left that company, several months
before it became absorbed, I promptly and thankfully forgot all I
knew of vi. unix, however, has interesting possibilities. I could
play in unix, if it did all the Windows stuff and had Delphi for my
retirement sandbox. I've been retired for OMG! 15 years now.

Yeah, I understand where you're coming from. I was an aerodynamics
engineer, and we got a bunch of Unix boxes for our group servers. vi
was the only editor. I hated it, and started campaigning to get
another editor. My boss got wind of it and sent me a none-too-subtle
message to just shut-the-f*** up and get on with things. So I trained
my finger-brain coordination system for vi, and now it is 25 years
later, and my fingers only speak vi on the keyboard. These dang
editors that require a mouse are killing me! kkkkhhhdw.. oops... :-)

I was an early Linux adopter and also learned Emacs early in the
university. There's no better editor than that, once you know the
keystrokes by heart.

I can manage with vi, but never learned enough to be able to anything
but the basics with it (I/A to switch to insert/append mode, X to delete
a char - and ZZ to save & get out :)
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 11:40 PM   in response to: John Treder in response to: John Treder
John Treder wrote:
Van Swofford wrote:

Then there are the few remaining old timers like me that still use vi

Argh. Once upon a time when I worked at a company that no longer exists, I had to learn vi because I kept crashing their unix servers, so they >"gave" me a "private' server and su and all that stuff, so I could fix what I broke myself.

When I was a young teen in an after-school program at AT&T, I tried learning to use vi on their ancient (even then) mainframe and genuine AT&T Unix. I managed to screw up vi in ways that even their vi expert acknowledged he didn't understand. :-) As such, even the mere mention of "vi" today sets off a mini panic-attack. Of course, when a mere 13 I was involved in a summer program at a college and I managed to screw up a word processor there to the degree that the professor who created it passed on a message to me congratulating me for screwing up my file so bad that even he couldn't recover it. :-) Maybe I'm just not safe around word processors.... (hint... someone find a way to get me close to the Microsoft Office team then sell MS short and we'll split the profits.....)

I could play in unix, if it did all the Windows stuff and had Delphi for my retirement sandbox.

In about five weeks I'll be celebrating my fourth year having switched over my home computing devices to Linux. In my opinion, Linux definitely does "all the Windows stuff" while adding a lot of stuff Windows simply doesn't do. As one person put it, Windows tends to be designed with its least capable users in mind, while Linux tends to be designed with its most capable users in mind. At it's heart, Linux is designed by developers for developers. The amount of control (and freedom) the user has is phenomenal and the "Unix design philosophy" makes it very simple to interface with and build upon existing software (plain text, pipes, system information as "files", command line versions of everything vs. binary, proprietary formats, complex language-specific APIs, GUI-only tools).

In 2004-5 I was working at the HQ of a major U.S. retailer. Sadly, most of my tools dated back to around 1997. Even springing them forward to today's versions, the setup I've put together with Linux, for free, dwarfs what I had access to at a billion-dollar company. I've got access to advanced data mining software with a drag/drop/connect GUI workflow designer, powerful web-centric reporting software, a computer mathematics platform (Sage) that rivals Mathematica and another the clones the very expensive Matlab, every language I want to use or even just want to take a look at someday... from Free Pascal and D and Python and Haxe to Go and Genie and Nimrod and of course C and C++ courtesy of gcc and LLVM, Mono to run .Net software and languages, too many IDEs to keep track of (KDevelop, MonoDevelop, Eclipse, PyCharm, etc.), a cross-platform framework (Qt), enterprise-grade RDBMS PostgreSQL along with local db SQLite (although I've got MariaDB, a fork of MySQL on here and I could get "express" editions of Oracle and DB2 if I wanted), Photoshop-level image editing, version control via mercurial (but of course I could also use any other major tool like git or subversion or bazaar), full-system text searching (that I can even access from the open file dialog to locate my files!), full disk encryption, tools for ebook organization, conversion and syncing to keep track of the research papers and books I work with, GnuCash which I'm using for personal and small business accounting needs, VirtualBox for "heavy" virtualization and Linux's built-in tools and sandboxing software for "light" virtualization, mapping software (I used to work in logistics so I'm partial to good mapping software and tools that let me draw thematic maps), very powerful documentation software (good enough to create books with), programmer's text editor (although the modestly priced Sublime Text might be my next stop). I've got powerful PIM software, time tracker, project management, note-taking software, bibliographic reference tracking software, and lots of other software I can't recall right now. I also use the system for personal use with a music manager, media manager for television recording/viewing, organizing photos, etc.

Other than Google Earth and a few old Windows games (yes, I can run those too via a Windows compatibility layer), the entire system is open source. Not only do I lack for nothing, as hinted at in many cases I've installed 4, 5, 6 different pieces of software for the same task because I intend to try them all out "someday" and they're free so why not? In addition I've now got one tool to update all software on the system including the OS, lots of polish like a clipboard manager, a desktop where everything is customizable, a file system that essentially never needs defragging, and a keyboard-centric drop-down tool that is the keyboard equivalent of Siri with plugins to do anything (I've used it to spell-check words, define words, launch files and programs, launch websites including having access to my bookmarks, it integrates with my contacts so I can start typing a name and drop-down options appear to e-mail, Skype, etc., I can perform calculations, convert units, heck the other day based on a vague memory I typed "299EUR to USD" and it got the latest currency conversation rates and gave me the price in dollars!). I'm as happy as a clam and have made some "turn-key appliances" for people (another powerful option) with the OS, software, and my own configuration and instructions on an image that can be run live from optical or USB media or installed to a PC.

One can do an amazing deal with Linux today, whether as a "retirement sandbox", learning platform, turn-key development or data-mining box, or home server, NAS, or home media PC. Heck, my one modest desktop serves as development and data-mining desktop while also serving media to my other devices including pocket Android media player.

I've been retired for OMG! 15 years now.

Hope you're keeping busy and having fun. Linux might be an interesting project to play with for you.
John Treder

Posts: 349
Registered: 8/2/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 11:54 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

John Treder wrote:

One can do an amazing deal with Linux today, whether as a "retirement sandbox", learning platform, turn-key development or data-mining box, or home server, NAS, or home media PC. Heck, my one modest desktop serves as development and data-mining desktop while also serving media to my other devices including pocket Android media player.

I've been retired for OMG! 15 years now.

Hope you're keeping busy and having fun. Linux might be an interesting project to play with for you.

I'm so busy I can't figure out how I ever found time to work! :-) And it's a lot of fun teasing serious-minded people in places like this. ;^)

--
Tredmill
Van Swofford

Posts: 397
Registered: 6/28/03
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 12:27 PM   in response to: John Treder in response to: John Treder
John Treder wrote:

I'm so busy I can't figure out how I ever found time to work! :-)
And it's a lot of fun teasing serious-minded people in places like
this. ;^)

Now that's the real joy of retirement! :-)

--
Cheers,
Van

"Good judgment comes from experience, and a lot of that comes from bad
judgment." - Will Rogers
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 6:16 PM   in response to: Van Swofford in response to: Van Swofford
Van Swofford wrote:

Then there are the few remaining old timers like me that still use vi
as an editor, which replaces leading spaces with tabs when there are 8
or more of them.

In the Linux world I have one foot in, lots of people use vim, and often in lieu of an IDE. Are you using vi, vim or another version, and are you sure it's doing that conversion as a default? From what I can see it looks like that might be something it's been told to do:

http://vim.wikia.com/wiki/Autoconvert_leading_eight_spaces_to_tab_when_type_or_paste_in_Makefile
Van Swofford

Posts: 397
Registered: 6/28/03
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 8:20 PM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

Van Swofford wrote:

Then there are the few remaining old timers like me that still use
vi as an editor, which replaces leading spaces with tabs when there
are 8 or more of them.

In the Linux world I have one foot in, lots of people use vim, and
often in lieu of an IDE. Are you using vi, vim or another version,
and are you sure it's doing that conversion as a default? From what I
can see it looks like that might be something it's been told to do:

http://vim.wikia.com/wiki/Autoconvert_leading_eight_spaces_to_tab_when_type_or_paste_in_Makefile

I use a very old version of MKS vi. It automatically replaces spaces
with tabs when there are enough of them. I can probably find it in the
documentation, if I can find that somewhere around here (it's like
maybe 20 years old). My recollection is that using tabs is the
default, and there is a way to change it. Until I need to edit a
source file in the Delphi editor, which isn't all that often, I never
notice it, so it really hasn't been too objectionable.

--
Cheers,
Van

"Good judgment comes from experience, and a lot of that comes from bad
judgment." - Will Rogers
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 2:20 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:
Dalija Prasnikar wrote:

Would you make up your mind. Either you are curly braces guy or
indentation guy. You CANNOT be both ;-)

Actually, it's a kind of boolean logic thing: (NOT A) = B + C.

In other words, I particularly detest, with a capital D, the use of
'begin' and 'end'. Truly, joking aside - I hate having to type them
and hate having to read them. Thus compared with 'begin/end', curly
braces OR indents are wonderful.

I don't understand why people object to Python's system. If you
always indent your blocks anyway, as I do religiously, it makes the
delimiters superfluous. It's a logical conclusion simply to enforce
the indenting, and do away with the delimiters altogether.

My problem is because correctness of program depends on esotheric
white space where accidental changes can easily go unnoticed.

I know that there are other means of ensuring correctness, but there
are also other means of ensuring properly formatted code.

Dalija Prasnikar
Van Swofford

Posts: 397
Registered: 6/28/03
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 7:35 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:

My problem is because correctness of program depends on esotheric
white space where accidental changes can easily go unnoticed.

Ditto. And I'm curious as to how tabs are handled. Is a tab a single
character of white space, or is it equivalent to 8 spaces? I would
think that might make a big difference in program execution if tabs are
ambiguous. They might look one way in one editor and another way in a
different one, which would change the perceived alignment.

I definitely prefer something visual to delineate a block of code.

--
Cheers,
Van

"Good judgment comes from experience, and a lot of that comes from bad
judgment." - Will Rogers
Jouni Aro

Posts: 86
Registered: 9/4/97
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 11:05 AM   in response to: Van Swofford in response to: Van Swofford
On 05/06/14 17:35, Van Swofford wrote:
Dalija Prasnikar wrote:

My problem is because correctness of program depends on esotheric
white space where accidental changes can easily go unnoticed.

Ditto. And I'm curious as to how tabs are handled. Is a tab a single
character of white space, or is it equivalent to 8 spaces? I would
think that might make a big difference in program execution if tabs are
ambiguous. They might look one way in one editor and another way in a
different one, which would change the perceived alignment.

I definitely prefer something visual to delineate a block of code.

Eclipse Java editor can format the code for example automatically
whenever you save and fix the indentation for you. This is pretty
important with curlies, IMO.
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 11:44 AM   in response to: Van Swofford in response to: Van Swofford
Van Swofford wrote:
Dalija Prasnikar wrote:

My problem is because correctness of program depends on esotheric
white space where accidental changes can easily go unnoticed.

Ditto. And I'm curious as to how tabs are handled. Is a tab a single
character of white space, or is it equivalent to 8 spaces? I would
think that might make a big difference in program execution if tabs are
ambiguous. They might look one way in one editor and another way in a
different one, which would change the perceived alignment.

I am not quite sure, I think that single tab equals 8 spaces, and I have found
some complaints about code screw ups in different editors when both tabs
and spaces were used.

Dalija Prasnikar
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 12:02 AM   in response to: Van Swofford in response to: Van Swofford
Van Swofford wrote:

Ditto. And I'm curious as to how tabs are handled. Is a tab a single
character of white space, or is it equivalent to 8 spaces?

A tab is a level of indentation. However, at least with the current version of Python, tabs and spaces can't be mixed, and the Python style guide strongly discourages the use of tabs at all.

Spaces are the preferred indentation method.
Tabs should be used solely to remain consistent with code that is already indented with tabs.
Python 3 disallows mixing the use of tabs and spaces for indentation.
...When invoking the Python 2 command line interpreter with the -t option, it issues warnings about code that illegally mixes tabs and spaces.
When using -tt these warnings become errors. These options are highly recommended!

The style guide strongly encourages four spaces per level of indentation.
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 10:43 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:

My problem is because correctness of program depends on esotheric
white space where accidental changes can easily go unnoticed.

How is it esoteric? All code within the same block needs to be at the same level of indentation. Move a line a space or two (style guide encourages four spaces per level of indentation) and the line won't be aligned with any level of indentation and you'll get an error just like Delphi code insight if your begins/ends don't match up.

Meanwhile, you're not addressing the much more common situation where visual indentation of code doesn't match the actual execution, and which has documented instances of causing major problems and money in enterprise software.

Here, watch this for about a minute and a half and you'll understand why significant whitespace is a winning feature that solves problems:

http://youtu.be/oLHmoy9bKCY?t=9m42s

I know that there are other means of ensuring correctness, but there
are also other means of ensuring properly formatted code.

There's no simpler, cleaner, more beautiful way.
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 10:56 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

There's no simpler, cleaner, more beautiful way.

That's a big +1 from me. I always much preferred curly braces to
begin/end, but now I prefer none at all.

--
SteveT
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 12:28 PM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:
Dalija Prasnikar wrote:

My problem is because correctness of program depends on esotheric
white space where accidental changes can easily go unnoticed.

How is it esoteric? All code within the same block needs to be at the same level of indentation. Move a line a space or two (style guide encourages four spaces per level of indentation) and the line won't be aligned with any level of indentation and you'll get an error just like Delphi code insight if your begins/ends don't match up.

It is esotheric in a way that it is empty (invisible) space. It is nothing, instead
of something. And while it visually gives you proper feedback, I think it is fragile
to accidental changes that can go unoticed.


Meanwhile, you're not addressing the much more common situation where visual indentation of code doesn't match the actual execution, and which has documented instances of causing major problems and money in enterprise software.

Code formatters can deal with that. Also, like I said I have never ever experienced
situation in Pascal where indentation would lie to me, simply because begin/ends
stick out so much and cannot be missed, and if they are not there you can easily
spot that too.

Here, watch this for about a minute and a half and you'll understand why significant whitespace is a winning feature that solves problems:

http://youtu.be/oLHmoy9bKCY?t=9m42s

Sorry, too long for me to watch now. And again, I don't have any problems
that need to be solved by significant whitespace.


I know that there are other means of ensuring correctness, but there
are also other means of ensuring properly formatted code.

There's no simpler, cleaner, more beautiful way.

So you say.

Dalija Prasnikar
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 6:49 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

Dalija Prasnikar wrote:

My problem is because correctness of program depends on esotheric
white space where accidental changes can easily go unnoticed.

How is it esoteric? All code within the same block needs to be at the
same level of indentation.

That is what makes it esoteric: syntax should not depend on formatting,
period.

--
Rudy Velthuis (TeamB) http://www.teamb.com

"If computers get too powerful, we can organize them into a
committee -- that will do them in." -- Bradley's Bromide.
Quentin Correll


Posts: 2,412
Registered: 12/1/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 9:34 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy,

| syntax should not depend on formatting, period.

Another redundant ditto.

--
Q

Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 11, 2014 2:46 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:
Joseph Mitzen wrote:

How is it esoteric? All code within the same block needs to be at the
same level of indentation.

That is what makes it esoteric: syntax should not depend on formatting,
period.

That's not an argument; that's a declaration. "It's just wrong!"

Indentation is required of programmers. While not required by the compiler, it is required by any style guide. Adding delimiters is just doing the same thing twice when you can use one method to satisfy both the human and the compiler.

Also, this can't happen:

For x := 1 To 10 Do;
    WriteLn("Hello!");


When indentation is significant it can't lie to you.

That's a clear, concise argument: why it's useful and what problems it solves. What does using both indentation and delimiters gain for you?

I just grabbed a code example at random from the net:

procedure TfmFilterFrm.ApplyFilter(Sender: TObject);
begin
  with fmCustView.EmployeeSource.Dataset do
  begin
    if ComboBox1.Text <> '' then
    begin
      Filter := ComboBox1.Text;
      Filtered := True;
      fmCustView.Label1.Caption := 'Filtered';
    end
    else begin
      Filter := '';
      Filtered := False;
      fmCustView.Label1.Caption := 'Unfiltered'
    end;
  end;
end;


Let's remove the indentation:

procedure TfmFilterFrm.ApplyFilter(Sender: TObject);
begin
with fmCustView.EmployeeSource.Dataset do
begin
if ComboBox1.Text <> '' then
begin
Filter := ComboBox1.Text;
Filtered := True;
fmCustView.Label1.Caption := 'Filtered';
end
else begin
Filter := '';
Filtered := False;
fmCustView.Label1.Caption := 'Unfiltered'
end;
end;


Would you want to read code like this? No? Indentation is vital for clear reading of code.

Now let's remove the begins and ends:

procedure TfmFilterFrm.ApplyFilter(Sender: TObject);
    with fmCustView.EmployeeSource.Dataset do
        if ComboBox1.Text <> '' then
            Filter := ComboBox1.Text;
            Filtered := True;
            fmCustView.Label1.Caption := 'Filtered';
        else 
            Filter := '';
            Filtered := False;
            fmCustView.Label1.Caption := 'Unfiltered';


Absolutely no loss of readability at all. It's quite clear which of the two is necessary and which is superfluous.

These are the facts and claims any argument to the contrary needs to address and refute.

Edited by: Joseph Mitzen on Jun 11, 2014 2:46 PM
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 11, 2014 2:58 PM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

Rudy Velthuis (TeamB) wrote:
Joseph Mitzen wrote:

How is it esoteric? All code within the same block needs to be at
the same level of indentation.

That is what makes it esoteric: syntax should not depend on
formatting, period.

That's not an argument; that's a declaration. "It's just wrong!"

I am stating my preferences. I find it wrong. So to me, it is wrong.
Period.
--
Rudy Velthuis (TeamB) http://www.teamb.com

"Be tolerant of the human race. Your whole family belongs to it
-- and some of your spouse's family too." -- Anonymous.
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 11, 2014 3:30 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:

I am stating my preferences. I find it wrong. So to me, it is wrong.
Period.
--

Rudy, you're always doing that: expressing opinions as assertions. We
find it very confusing! Also, why so black and white? I prefer white
space only for block delimiters; then curly braces; and last of all
begin/end. But I don't claim any of these are "right" or "wrong"
because they are just preferences. How can a preference be right or
wrong?

--
SteveT
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 18, 2014 2:43 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Rudy Velthuis (TeamB) wrote:

I am stating my preferences. I find it wrong. So to me, it is wrong.
Period.
--

Rudy, you're always doing that: expressing opinions as assertions.

If it is clear that it is an opinion, I see no need to insert monikers
like "I think", or "IMO". Otherwise, I will.

We
find it very confusing!

Who, we?

Also, why so black and white? I prefer white space only for block
delimiters

As I said: I think that a language which needs whitespace as
syntactical element is deficient. I know that some popular languages,
like Python, Ruby, Occam, etc. do this, but it is IMO a deficiency.
FWIW, a language that relies on case is deficient too, IMO.

These are black and white opinions, indeed. There is not much
inbetween, so why not?
--
Rudy Velthuis (TeamB) http://www.teamb.com

"Ever stop to think, and forget to start again?"
-- bumper sticker
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 18, 2014 3:00 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:
Steve Thackery wrote:

Also, why so black and white? I prefer white space only for block
delimiters

As I said: I think that a language which needs whitespace as
syntactical element is deficient. I know that some popular languages,
like Python, Ruby, Occam, etc. do this, but it is IMO a deficiency.
FWIW, a language that relies on case is deficient too, IMO.

These are black and white opinions, indeed. There is not much
inbetween, so why not?

It is so refreshing when I can fully agree with you ;-)

Dalija Prasnikar
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 23, 2014 12:59 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:

Rudy Velthuis (TeamB) wrote:
Steve Thackery wrote:

Also, why so black and white? I prefer white space only for
block delimiters

As I said: I think that a language which needs whitespace as
syntactical element is deficient. I know that some popular
languages, like Python, Ruby, Occam, etc. do this, but it is IMO a
deficiency. FWIW, a language that relies on case is deficient too,
IMO.

These are black and white opinions, indeed. There is not much
inbetween, so why not?

It is so refreshing when I can fully agree with you ;-)

YAY! Oh, and "Hup Holland!"

--
Rudy Velthuis (TeamB) http://www.teamb.com

"The Bible was a consolation to a fellow alone in the old cell.
The lovely thin paper with a bit of matress stuffing in it, if
you could get a match, was as good a smoke as I ever tasted."
-- Brendan Behan.

Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 11, 2014 3:26 PM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

procedure TfmFilterFrm.ApplyFilter(Sender: TObject);
    with fmCustView.EmployeeSource.Dataset do
        if ComboBox1.Text <> '' then
            Filter := ComboBox1.Text;
            Filtered := True;
            fmCustView.Label1.Caption := 'Filtered';
        else 
            Filter := '';
            Filtered := False;
            fmCustView.Label1.Caption := 'Unfiltered';


Absolutely no loss of readability at all. It's quite clear which of
the two is necessary and which is superfluous.

I think this illustrates the argument really well. It is perfectly -
indeed beautifully - clear, and no messy visual "noise" from delimiters.

--
SteveT
Anders Isaksson


Posts: 30
Registered: 4/15/00
Re: New Apple programming language? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 12, 2014 6:15 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

Let's remove the indentation:

procedure TfmFilterFrm.ApplyFilter(Sender: TObject);
begin
with fmCustView.EmployeeSource.Dataset do
begin
if ComboBox1.Text <> '' then
begin
Filter := ComboBox1.Text;
Filtered := True;
fmCustView.Label1.Caption := 'Filtered';
end
else begin
Filter := '';
Filtered := False;
fmCustView.Label1.Caption := 'Unfiltered'
end;
end;


Would you want to read code like this? No? Indentation is vital for
clear reading of code.

Now let's remove the begins and ends:

procedure TfmFilterFrm.ApplyFilter(Sender: TObject);
    with fmCustView.EmployeeSource.Dataset do
        if ComboBox1.Text <> '' then
            Filter := ComboBox1.Text;
            Filtered := True;
            fmCustView.Label1.Caption := 'Filtered';
        else 
            Filter := '';
            Filtered := False;
            fmCustView.Label1.Caption := 'Unfiltered';


Absolutely no loss of readability at all. It's quite clear which of
the two is necessary and which is superfluous.

Described in this way, 'indentation as block delimiter' looks pretty
convincing (assuming you can choose the number of indents by yourself -
I definitely dislike the four space long indent).

Dominique Willems

Posts: 591
Registered: 10/26/99
Re: New Apple programming language? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 12, 2014 8:04 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:
Absolutely no loss of readability at all. It's quite clear which of
the two is necessary and which is superfluous.

Looks fine by me. Can you have this on our desks in the morning?
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 12, 2014 5:02 PM   in response to: Dominique Willems in response to: Dominique Willems
Dominique Willems wrote:
Joseph Mitzen wrote:
Absolutely no loss of readability at all. It's quite clear which of
the two is necessary and which is superfluous.

Looks fine by me. Can you have this on our desks in the morning?

Not quite. But Eric Grange was considering doing it for DWScript so you can tell him you support the option. :-)

And the best thing is, to borrow a joke from Guido Van Rossum, significant indentation also supports begin..end too!

If x = 7 Then
  //Begin
       y := 3;
       a := 13;
  //End;


:-) :-) :-)
Dominique Willems

Posts: 591
Registered: 10/26/99
Re: New Apple programming language? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 13, 2014 2:25 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:
//Begin
y := 3;
a := 13;
//End;

Ooh, that's evil! :)
Enquiring Mind

Posts: 88
Registered: 10/6/08
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 6:29 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:
Dalija Prasnikar wrote:

Would you make up your mind. Either you are curly braces guy or
indentation guy. You CANNOT be both ;-)

Actually, it's a kind of boolean logic thing: (NOT A) = B + C.

In other words, I particularly detest, with a capital D, the use of
'begin' and 'end'. Truly, joking aside - I hate having to type them
and hate having to read them. Thus compared with 'begin/end', curly
braces OR indents are wonderful.

I don't understand why people object to Python's system. If you
always indent your blocks anyway, as I do religiously, it makes the
delimiters superfluous. It's a logical conclusion simply to enforce
the indenting, and do away with the delimiters altogether.
People rightly IMHO object to any system of syntax that turns the clock back to the days of punched cards and early versions of Fortran, when the meaning of a text file depended on the exact column position. That restriction makes it easier for a compiler writer to read and interpret the text, but more difficult for developers to produce flexible text. Block-structured languages like Algol, Pascal and C introduced free-format syntax based on brackets and separators, which represented a major advance in programming methodology.

As for "begin..end" versus "{..}", "de gustibus non disputandum est" (I.e. there's no arguing about personal tastes). Suffice it to say that in most academic books on algorithms that I am familiar with, the "begin..end" notation is preferred to curly bracket notation in pseudo-code, because it carries more meaning, and thus makes the pseudo-code more readable. Curly brackets are just delimiters/containers for a list of items, often numeric values or objects (or *nouns*), and this usage is akin to their usage in mathematics to denote a set or a vector; while begin..end are delimiters reserved for a sequence of actions or steps (or *verbs*), and thus clearly express a subdivision of an algorithm as a block or compound statement. "Algorithm" may be defined as a sequence of actions/steps aimed at obtaining a given result, such as the steps in a cooking recipe, or the steps in calculating one's tax liability. One type of block is a procedure or function; another type is a block delimited by begin..end or a construct such as "for..end" or "while..end".

EM
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 9:20 AM   in response to: Enquiring Mind in response to: Enquiring Mind
Enquiring Mind wrote:

People rightly IMHO object to any system of syntax that turns the
clock back to the days of punched cards and early versions of
Fortran, when the meaning of a text file depended on the exact column
position. That restriction makes it easier for a compiler writer to
read and interpret the text, but more difficult for developers to
produce flexible text. Block-structured languages like Algol, Pascal
and C introduced free-format syntax based on brackets and separators,
which represented a major advance in pr ogramming methodology.

I cannot deny any of that, and yet we find people writing big programs
in Python perfectly well.

Isn't the proof of the pudding in the eating?

--
SteveT
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 1:30 PM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Enquiring Mind wrote:

People rightly IMHO object to any system of syntax that turns the
clock back to the days of punched cards and early versions of
Fortran, when the meaning of a text file depended on the exact
column position. That restriction makes it easier for a compiler
writer to read and interpret the text, but more difficult for
developers to produce flexible text. Block-structured languages
like Algol, Pascal and C introduced free-format syntax based on
brackets and separators, which represented a major advance in pr
ogramming methodology.

I cannot deny any of that, and yet we find people writing big programs
in Python perfectly well.

One can get used to so many things. Some people can even use Perl while
controlling their urge to throw up.

--
Rudy Velthuis (TeamB) http://www.teamb.com

"Democracy is the process by which people choose the man who'll
get the blame." -- Bertrand Russell
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 11, 2014 2:56 PM   in response to: Enquiring Mind in response to: Enquiring Mind
Enquiring Mind wrote:

People rightly IMHO object to any system of syntax that turns the clock back to the days of punched cards and early versions of Fortran, when
the meaning of a text file depended on the exact column position.

It's the levels of indentation that are important, not specific meaning attached to a specific column position. Meanwhile, every line of code you write is employing the same rules of indentation, which makes the whole thing so comical.

That restriction makes it easier for a compiler writer to read and interpret the text

It doesn't make it any easier than any other delimiter system (arguably more difficult) and was not implemented in Python for that reason at all.

but more difficult for developers to produce flexible text

What "flexibility"? Programmers follow style guides and do not arbitrarily change the rules for "flexibility". Are you saying you want to write code like this?

If x = 7 Then
    Begin
        y := 6;
n := 10;
  z := 4;
End.


No? Then there's no issue of "flexibility" here.

Block-structured languages like Algol, Pascal and C introduced free-format syntax based on brackets and separators, which represented a
major advance in programming methodology.

You have a very low bar for what's considered a "major advance" in programming.

As for "begin..end" versus "{..}", "de gustibus non disputandum est" (I.e. there's no arguing about personal tastes). Suffice it to say that in
most academic books on algorithms that I am familiar with, the "begin..end" notation is preferred to curly bracket notation in pseudo-code,
because it carries more meaning, and thus makes the pseudo-code more readable.

One can counter that in all non Delphi-clone languages I'm familiar with, "begin...end" is not preferred in actual code implementation. I'm not sure we can really infer anything concrete here.

And then there's this :

We will perhaps eventually be writing only small modules which are identified by name as they are used to build larger ones, so that devices
like indentation, rather than delimiters, might become feasible for expressing local structure in the source language.
–Donald E. Knuth, “Structured Programming with goto Statements”, Computing Surveys, Vol 6 No 4, Dec. 1974

I was a C++ guy at the time (and just beginning to learn that things were deeply amiss with Java) and everywhere I’d ever worked, your code
would be rejected upon review if you didn’t meet code standards, of which indentation was a prominent part. For this enforcement to come from
the language rather than peer review seemed a natural progression.
...There are still people who make an amazing amount of noise about a syntactic feature that enforces clarity. Over the years I’ve heard many
criticisms of Python, many which have been very valid, and many of those which have since been addressed. ... I have never taken anyone
seriously who held the indentation as a serious defect in Python, and so I might as well use the KIQ as the light-hearted tool it is. In future,
rather than rolling my eyes the next time someone says “Ewww. Significant whitespace”, I’ll just smile and trot out the words of the greatest
mind in the history of computer science (sorry, Turing and von Neumann fans).
-Uche Ogbuji

Edited by: Joseph Mitzen on Jun 11, 2014 2:57 PM

Edited by: Joseph Mitzen on Jun 11, 2014 3:02 PM
Aage Johansen

Posts: 23
Registered: 9/27/00
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 1:26 PM   in response to: Steve Thackery in response to: Steve Thackery
On 04.06.2014 18:55, Steve Thackery wrote:
Dalija Prasnikar wrote:

Would you make up your mind. Either you are curly braces guy or
indentation guy. You CANNOT be both ;-)

Actually, it's a kind of boolean logic thing: (NOT A) = B + C.

In other words, I particularly detest, with a capital D, the use of
'begin' and 'end'. Truly, joking aside - I hate having to type them
and hate having to read them. Thus compared with 'begin/end', curly
braces OR indents are wonderful.

I don't understand why people object to Python's system. If you
always indent your blocks anyway, as I do religiously, it makes the
delimiters superfluous. It's a logical conclusion simply to enforce
the indenting, and do away with the delimiters altogether.

And indentation errors are easy to detect?
Missing "end" can be detected by the IDE.

I do indent. And I don't miss the way I had to do this in ALGOL60: @begin@
...;
@end@;
All "keywords" were always started and ended with @. No kidding.

--
Aage J.

Martyn Spiggott

Posts: 9
Registered: 10/19/13
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 2:17 PM   in response to: Aage Johansen in response to: Aage Johansen
All "keywords" were always started and ended with @. No kidding.

Interesting, but definitely not, in the Algol60 implementation I used
c.1968..70 at school (UK); in fact I don't think the TTYs/card punches
we used even had an @ symbol.

Cheers Martyn
Aage Johansen

Posts: 23
Registered: 9/27/00
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 1:02 PM   in response to: Martyn Spiggott in response to: Martyn Spiggott
On 05.06.2014 23:17, Martyn Spiggott wrote:
All "keywords" were always started and ended with @. No kidding.

Interesting, but definitely not, in the Algol60 implementation I used
c.1968..70 at school (UK); in fact I don't think the TTYs/card punches
we used even had an @ symbol.

Cheers Martyn

The computer we used at the university was a CDC3300 (in use approx.
1966-1976).
The card punches supported @, but not all printers!

--
Aage J.

Aage Johansen

Posts: 23
Registered: 9/27/00
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 1:35 PM   in response to: Aage Johansen in response to: Aage Johansen
On 06.06.2014 22:02, Aage Johansen wrote:
On 05.06.2014 23:17, Martyn Spiggott wrote:
All "keywords" were always started and ended with @. No kidding.

Interesting, but definitely not, in the Algol60 implementation I used
c.1968..70 at school (UK); in fact I don't think the TTYs/card punches
we used even had an @ symbol.

Cheers Martyn

The computer we used at the university was a CDC3300 (in use approx.
1966-1976).
The card punches supported @, but not all printers!

Ahem
I may have misrembered. I just retrieved a pocket guide (Control Data
INSTANT 3100/3200/3300/3500 ALGOL, 1966). In it, ALGOL symbols (like
begin, end, integer) are represented by 'BEGIN', 'END' and 'INTEGER' and
so on. Maybe the university had tweaked the code (they had full source,
and I think they did some tinkering).
Maybe it was Simula67 that used @.
Still, I do remember the @, and on some printers they came out as
something else (≠ - not equal, I think).

Well, well.

--
Aage J.

Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 12, 2014 5:49 PM   in response to: Aage Johansen in response to: Aage Johansen
Aage Johansen wrote:
And indentation errors are easy to detect?

Sure? You just look at the code. The indentation can't lie to you.

Missing "end" can be detected by the IDE.

The serious bugs don't involve missing "end"s; the serious problems are when the indentation doesn't match the actual flow control.

The simplest example:

For x := 1 To 10 Do;
    WriteLn("Hello");


THAT'S the kind of error you avoid with significant indentation, along with even more complicated ones when you have nested if statements or "while" loops.

I do indent. And I don't miss the way I had to do this in ALGOL60: @begin@
...;
@end@;
All "keywords" were always started and ended with @. No kidding.

That doesn't seem like fun at all.
Tony Bryer

Posts: 15
Registered: 10/2/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 12, 2014 10:41 PM   in response to: Joseph Mitzen in response to: Joseph Mitzen
In article <680377 at forums dot embarcadero dot com>, Joseph Mitzen wrote:
The serious bugs don't involve missing "end"s; the serious problems
are when the indentation doesn't match the actual flow control.

That's why I love the Delphi formatter

--
Tony Bryer, Greentram Software Pty Ltd, Melbourne, Australia
'Software to build on' http://www.greentram.com
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 13, 2014 12:55 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

I do indent. And I don't miss the way I had to do this in ALGOL60: @begin@
...;
@end@;
All "keywords" were always started and ended with @. No kidding.

That doesn't seem like fun at all.

Have you seen Objective-C?

Dalija Prasnikar
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 23, 2014 12:59 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:

Joseph Mitzen wrote:

I do indent. And I don't miss the way I had to do this in
ALGOL60: @begin@ ...;
@end@;
All "keywords" were always started and ended with @. No kidding.

That doesn't seem like fun at all.

Have you seen Objective-C?

Some keywords (usually to describe classes and metadata) do indeed
start (but not end) with @. But most don't. And Objective-C is not so
full of kewords anyway.

--
Rudy Velthuis (TeamB) http://www.teamb.com

"If pigs could vote, the man with the slop bucket would be
elected swineherd every time, no matter how much slaughtering
he did on the side."
-- Orson Scott Card
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 23, 2014 5:10 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:
Dalija Prasnikar wrote:

Joseph Mitzen wrote:

I do indent. And I don't miss the way I had to do this in
ALGOL60: @begin@ ...;
@end@;
All "keywords" were always started and ended with @. No kidding.

That doesn't seem like fun at all.

Have you seen Objective-C?

Some keywords (usually to describe classes and metadata) do indeed
start (but not end) with @. But most don't. And Objective-C is not so
full of kewords anyway.

It is not about how many keywords it has, but how often you have to use them.
Code I have seen has enough @ to make my head spin...

Dalija Prasnikar
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 23, 2014 8:45 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:

Rudy Velthuis (TeamB) wrote:
Dalija Prasnikar wrote:

Joseph Mitzen wrote:

I do indent. And I don't miss the way I had to do this in
ALGOL60: @begin@ ...;
@end@;
All "keywords" were always started and ended with @. No
kidding.

That doesn't seem like fun at all.

Have you seen Objective-C?

Some keywords (usually to describe classes and metadata) do indeed
start (but not end) with @. But most don't. And Objective-C is not
so full of kewords anyway.

It is not about how many keywords it has, but how often you have to
use them. Code I have seen has enough @ to make my head spin...

Not so often. You'll see more in a .h file that declares a class and
its properties, but otherwise, in the .m files I have, not so many @s
at all. No big deal, IMO, although I am not fond of them either.

--
Rudy Velthuis (TeamB) http://www.teamb.com

"Do, or do not. There is no 'try'."
-- Yoda ('The Empire Strikes Back')
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 5, 2014 6:07 PM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:
I don't understand why people object to Python's system.

You know why. In general, people object to it just because it's different from whatever their favorite language is. To admit it's better would be to admit less than perfection in their favorite language, and since their identity is tied up in their language choice, they simply can't do it. Thus, as you go on to point out, they'll religiously indent anyway and then tell you in the next breath that it would be absolutely horrible if they were required to do something they already demand of themselves anyway. :-( It's http://en.wikipedia.org/wiki/Cognitive_dissonance that they're experiencing.

It's a logical conclusion simply to enforce
the indenting, and do away with the delimiters altogether.

Logic has nothing to do with people's aversion to significant whitespace.
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 2:24 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

..... since their identity is tied up in their language choice, they
simply can't do it.

Wise words. I always thought programmers would be supremely rational
and logical people, but unfortunately they aren't - they are just like
everyone else: their gut makes a decision and their mind comes up with
reasons to justify it.

--
SteveT
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 12, 2014 5:57 PM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:
they are just like
everyone else: their gut makes a decision and their mind comes up with
reasons to justify it.

This is a subject I find fascinating. They've taken people with a preference for one soft drink over another and given them taste tests. They would then reveal to a subject who was partial to cola A that they picked cola B instead while they were hooked up a scanner to examine their brain. The subject would often then start saying things like, "Well, come to think of it I remember that that one tasted a little too sweet...." The MRI showed that the brain area responsible for storing short-term memory was triggering. They weren't making up excuses; their mind was actually rewriting its short-term memory to make it consistent with its belief system!!!

The degree to which our brains can unconsciously alter our memories or our sense perceptions to match our mental models (rather than update the models to reflect current sensory data) is astounding, and of course the degree to which this happens varies in individuals. Our ability to deal with cognitive dissonance is a major personality trait and affects us in many ways. We can all really experience the same thing in many different ways depending upon our individual beliefs and expectations.

Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 2:57 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:
Steve Thackery wrote:
I don't understand why people object to Python's system.

You know why. In general, people object to it just because it's different from whatever their favorite language is. To admit it's better would be to admit less than perfection in their favorite language, and since their identity is tied up in their language choice, they simply can't do it. Thus, as you go on to point out, they'll religiously indent anyway and then tell you in the next breath that it would be absolutely horrible if they were required to do something they already demand of themselves anyway. :-( It's http://en.wikipedia.org/wiki/Cognitive_dissonance that they're experiencing.

I have finally figured out what is wrong with your postings. You are
smart guy and have plenty of good things to say, but you are unable
to distinguish which points are worth making in specific context.

And that results in people being unable to see through good parts
of your posts and focus only on idiotic ones (in context of forum where
most people prefer Pascal and have good reasons why they do so)

I am very, very far from being dinosaur that wants to live in the past and
never accept any progress. Almost any time Oxygene gest some new
great feature it makes me want to cry because I know that I can only
dream of having something like that in Delphi. Yes, Delphi had made
some progress in last 5 years or so, but comparing to what it might be
it is almost insignificant. Not to mention that good stuff are being half baked
and left like that.

We can have differences of opinion about braces, indentation, case sensitivity
or whatever you like, but there are some things that make Pascal what it is
and you have to give suggestions withing those boundaries. Insisting that
Delphi should drop begin/end blocks in favor of indentation is just downright stupid.
Not because indentation is wrong, but because it doesn't fit in Pascal ecosystem.

There is plenty of room for improvements in Pascal language that can make it
more modern and powerfull, and more to your liking, but those improvements have
to be made consistent with what Pascal as language is.

As far as new languages (including Swift) are concerned, from perspective of person
that has not fired up Delphi for more than a month (and I have not been on vacation)
your comments can be rather insulting. I don't take them like that but others may.

Learning new language is easy, I can pick up new language syntax and concepts in a day.
What takes more time is learning new frameworks and platforms. Here we are coming to
Swift again. I never said that it was not smart move for Apple, and I certainly like it more
than Objective-C. But people at Apple have made some mistakes in design too (in my opinion,
and I am not alone in such thinking). Without those mistakes Swift could have been even better.

Dalija Prasnikar
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 3:00 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:

Insisting that
Delphi should drop begin/end blocks in favor of indentation is just
downright stupid.

Wait a minute!! He never "insisted" anything of the sort! He made the
case for why begin/end are unnecessary.

You won't win an argument by misrepresenting your opponent, you know!

--
SteveT
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 6, 2014 3:38 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:
Dalija Prasnikar wrote:

Insisting that
Delphi should drop begin/end blocks in favor of indentation is just
downright stupid.

Wait a minute!! He never "insisted" anything of the sort! He made the
case for why begin/end are unnecessary.

Well, maybe he didn't do that right now (I am too busy for re-reading), but
that is general feeling I get from his posts and my reply was more general
reply taking into account not just this thread.

Like I said we can all have different likings, we can all jump at each other
throats about silly things whether braces are better than begin/end or indentation
and have fun where nobody will seriously think any less of the people on the
other side of the fence. We can also try to give arguments why we do have
the pereferences we have (and disagree about them too).

But at the point where it has been inferred that Delphi should embrace such things
(or it will be rendered obsolete) that are going completely against the nature of
Pascal language I have to draw the line. And yes, Joseph has done such things
in his posts. And I am truly sorry about that, because I do think that he has plenty
of valid things to say, but because of such inferrences, he is being marked as
enemy of the all things Delphi.

You won't win an argument by misrepresenting your opponent, you know!

I know.

Dalija Prasnikar
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 12, 2014 9:04 PM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:

But at the point where it has been inferred that Delphi should embrace such things
(or it will be rendered obsolete) that are going completely against the nature of
Pascal language I have to draw the line.

Drawing the line wouldn't make any such inference true or false. Whether we like the idea or not won't affect the outcome.

And yes, Joseph has done such things
in his posts. And I am truly sorry about that, because I do think that he has plenty
of valid things to say, but because of such inferrences, he is being marked as
enemy of the all things Delphi.

If the inference is correct but an unpleasant thought, that doesn't make it invalid. Computer scientists fought a bitter war over the use of GOTO beginning in the 1960s. Unbelievably, one last final paper in support of GOTO appeared as late as the mid 1980s! Heresy or not in some computer scientists' eyes, structured programming won the war and languages did indeed need to change or become irrelevant. As I've pointed out before, even BASIC evolved in response. Heck, in 2002 COBOL got object-oriented extensions and later on a port to .NET!!!

This reads like "he is being marked as [an] enemy of all things Delphi" because I'm saying things that are unpopular. If I hated Delphi I wouldn't have invested... well, a big chunk of my career, but also so much time today trying to think of ways to help it survive. If this makes people uncomfortable who want to believe that Delphi is still wildly popular and any day now it's going to gain a resurgence in the enterprise, well, 1) I'm sorry, but 2) good. They need to be made uncomfortable to put some pressure on EMBT to do more to help Delphi thrive. Reinventing Delphi as a mobile app platform is a good start but the language itself was never designed as such and they do need to come up with a concrete design philosophy for the language in the new millenium. They - and we - have to decide what we want Delphi to be. That'll only happen through all voices being heard and a lot of no doubt contentious debate. And the existing users need to have a major voice in that process. Delphi is far too much a "black box" development right now. That just doesn't work today in a world where almost every language is open source or has a standards committee and even Microsoft has gone and made a lot of the C# language and frameworks open source.
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 13, 2014 2:32 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:

This reads like "he is being marked as [an] enemy of all things Delphi" because I'm saying things that are unpopular. If I hated Delphi I wouldn't have invested... well, a big chunk of my career, but also so much time today trying to think of ways to help it survive. If this makes people uncomfortable who want to believe that Delphi is still wildly popular and any day now it's going to gain a resurgence in the enterprise, well, 1) I'm sorry, but 2) good. They need to be made uncomfortable to put some pressure on EMBT to do more to help Delphi thrive. Reinventing Delphi as a mobile app platform is a good start but the language itself was never designed as such and they do need to come up with a concrete design philosophy for the language in the new millenium. They - and we - have to decide what we want Delphi to be. That'll only happen through all voices being heard and a lot of no doubt contentious debate. And the existing users need to have a major voice in that process. Delphi is far too much a "black box" development right now. That just doesn't work today in a world where almost every language is open source or has a standards committee and even Microsoft has gone and made a lot of the C# language and frameworks open source.

I fully agree with you here. And that is exactly the reason why our voicing has
to be more reasonable, and changes we might propose have to be perceived
as possible. The second you step out of the line everything you say will just
get ignored.

I like discussions here with people that have slightly different opinions and
reasonings. It helps me to shape my opinions and desires better. And above
all it is good to have people that are able to say that the Emperor is naked when
he is. Another reason why I didn't like Joanna Carter being banned from here.
I didn't always agreed with her too, but she was bringing another perspective
and was able to pinpoint some mistakes much clearer than we could from
the start (DisposeOf).

Dalija Prasnikar
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 13, 2014 2:55 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:

I fully agree with you here. And that is exactly the reason why our
voicing has to be more reasonable, and changes we might propose have
to be perceived as possible.

The arrogance to tell Joseph to "be more reasonable"! Since when did
you get the job of moderator, Dalija? FWIW, I think Joseph's voice is
entirely reasonable. Challenging? - always. But always reasonable,
too.

The second you step out of the line
everything you say will just get ignored.

And just where is this line, Dalija? Is it one you painted?

I like discussions here with people that have slightly different
opinions and reasonings.

Only "slightly" different. So you don't like "radically" different?
OK, but that doesn't mean Joseph isn't allowed to express radically
different opinions. Personally, I love it when he does. I love having
my ideas challenged.

It helps me to shape my opinions and desires
better. And above all it is good to have people that are able to say
that the Emperor is naked when he is. Another reason why I didn't
like Joanna Carter being banned from here. I didn't always agreed
with her too, but she was bringing another perspective and was able
to pinpoint some mistakes much clearer than we could from the start
(DisposeOf).

So, you agree in principle, and differ only in degree.

--
SteveT
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 13, 2014 12:11 PM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:
Dalija Prasnikar wrote:

I fully agree with you here. And that is exactly the reason why our
voicing has to be more reasonable, and changes we might propose have
to be perceived as possible.

The arrogance to tell Joseph to "be more reasonable"! Since when did
you get the job of moderator, Dalija? FWIW, I think Joseph's voice is
entirely reasonable. Challenging? - always. But always reasonable,
too.

The second you step out of the line
everything you say will just get ignored.

And just where is this line, Dalija? Is it one you painted?

You have completely misunderstood my intentions. If they would be
what you think they are I would completely agree with you.

I like discussions here with people that have slightly different
opinions and reasonings.

Only "slightly" different. So you don't like "radically" different?
OK, but that doesn't mean Joseph isn't allowed to express radically
different opinions. Personally, I love it when he does. I love having
my ideas challenged.

His views are not radically different on things that do matter, he thinks
radically different about things I know that will never change (never say
never, though).

I always love having my ideas challenged, and I never said I mind discussing
anything, but Joseph was complaining that he is being perceived as troll
and someone that want's to turn Delphi into Python, and at one point
I have realized why. I also said that this is not directly related with this
thread, but his posts in general. After all, this thread started as rambling about
languages in general.

Dalija Prasnikar
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 12, 2014 8:52 PM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:

I have finally figured out what is wrong with your postings.

I thought the consensus was "that they exist".

(in context of forum where
most people prefer Pascal and have good reasons why they do so)

Sometimes it can be difficult to get people to talk about their good reasons for things. For instance, from Rudy earlier:

That is what makes it esoteric: syntax should not depend on formatting,
period....I am stating my preferences. I find it wrong. So to me, it is wrong.
Period.

I spent time laying out an argument under the assumption that we were discussing the facts and merits but in the end I got "It's just wrong, period." Nick and Q have expressed their distaste of significant indentation several times before but never explain why. Someone once started a thread about "the case for Delphi" and no one showed up to make the case. Mason infamously claimed he could write Delphi code as brief as Haskell and when it came time to do it declared that I just wouldn't understand his point and therefore he wasn't going to do it. Heck, I disagreed with him on Jim McKeeth's page where he tried arguing that distributed version control was inherently flawed/broken and the next day I discovered Mason has apparently used his blog's security software to block my IP from his blog! (The debate wasn't even on Mason's blog but on Jim's).

When that happens enough times it can become frustrating to say the least. It's hard to believe sometimes that people have good, rational reasons for their positions when they resist telling you what they are.

I am very, very far from being dinosaur that wants to live in the past and
never accept any progress.

I honestly don't believe I said that of anyone anywhere in this thread. My point about cognitive dissonance was that in earlier discussions no one laid out a clear reason for disliking it nor addressed its benefits. There's nothing wrong with having an emotional reason or simply preferring something to something else (books, movies, etc.) but when people call an alternative "wrong" or "nonsensical" or "flawed" or "broken" I expect them to be able to explain via facts and reasoning how they arrived at that conclusion. Otherwise it's like being asked your favorite color and then being told your answer is "wrong".

Almost any time Oxygene gest some new
great feature it makes me want to cry because I know that I can only
dream of having something like that in Delphi.

Fair enough, but for a certain significant minority here, almost any time any language gets - or is even acknowledged by anyone to have - a great feature, they scream that this is just "a fad" either added "for no reason" or "to look cool". And if you want that new feature, you're just lazy and stupid and not a genius like them. On the DH blog I was complaining about the Delphi dateutils library (which doesn't even use objects and is what I consider the worst library in the VCL). I was then asked if I wasn't a good enough programmer to implement everything in classes myself. :-(


We can have differences of opinion about braces, indentation, case sensitivity
or whatever you like, but there are some things that make Pascal what it is
and you have to give suggestions withing those boundaries.

That's an interesting thought. Raymond Hettinger calls this "zen" - a set of guiding principles or goals that define a language. Tim Peters once put Python creator Guido Van Rossum's design philosophy as he saw it into a little set of koans called "The Zen Of Python". Eiffel's creator Bertrand Meyer wrote a book, "Object-Oriented Software Construction" that outlined his design philosophy. Ruby's creator had a set of design goals. So if someone wants to decide whether something is "pythonic" or belongs in Eiffel, they can quote one of the lines of The Zen Of Python or say "Meyer writes on page 124 that....".

Tim Peters put it this way....

The problem I have with "SETL sets" in Python is the same I have with every other language's "killer core" in Python: SETL is much more than
just "a set type", Eiffel is much more than just fancy pre- and post- conditions, Perl's approach to regexps is much more than just its isolated
regexp syntax, Scheme is much more than just first-class functions & lexical closures, and so on. Good languages aren't random collections of
interchangeable features: they have a philosophy and internal coherence that's never profitably confused with their surface features.

Some languages don't have "zen". Raymond Hettinger was on the C++ design committee - which he said had hundreds or thousands of people on it and one got on it mostly just by saying one wanted to be. C++ is literally designed by committee such that individual parts may be coherent but there is not an overall design process going on.

The question that needs to be answered first then when addressing your concern is "Does Delphi have Zen?" I don't think I've ever seen anyone tackle that question. Wirth had some design goals, but the original Pascal that emerged was not suitable for professional software development (for instance strings were very flawed, per Wirth's own admission). Marketers of commercial Pascal compilers tried fixing these problems - each in their own way. There was eventually an ISO standard, but no one really followed it. Delphi lost its key guru early on to Microsoft. Unlike Python and Ruby which have a "BDFL" (Benevolent Dictator For Life) who will make the final call about what goes into the language, Delphi doesn't have this.The language doesn't even have a formal written grammar. Joe White once produced a grammar for Delphi and observed, euphemistically, that it was clear that the language "had developed organically" rather than "being designed from the beginning to be easy to write tools for". He gave many examples of the ways in which "Delphi is full of ambiguity" and thus why he needed to write a parser by hand.

Barry Kelly mentioned on Stack Overflow that since there was no formal written grammar that the compiler itself was the final say on Delphi - if it compiled, it was valid Delphi. He gave a (somewhat disconcerting) example in which even he and the compiler team were surprised that a certain code example compiled, but since it did it was official. Recently there was a Delphi bug fix that caused code that previously compiled to no longer compile. Someone complained about this and considered it a regression. Marco Cantu replied that it wasn't a regression since he believed that "it never should have compiled anyway". So this apparently means that even the supposedly final word, the compiler, is no longer the final word! Lastly, when discussing possible Delphi features with myself, Eric Grange and others in the comments section of his blog, Delphi Chief Scientist Allen Bauer added that it should be understood that any potential features have to be demonstrated to add to the bottom of line of Delphi before they would be authorized to be developed and added. In short, the chief scientist was saying as politely as possible that financial and marketing concerns are the final word rather than his own regarding how the language grows.

Given all that, I'm not sure it can really be said that there is a "Zen Of Delphi". Wirth went on to fix what he perceived as flaws in Pascal in Modula-2 and Oberon, but many of these changes never appeared in Delphi nor did Wirth himself have anything to do with Delphi's design. If there's no formal grammar it's hard to believe there's a (secret) formal design document. The compiler's not the final source, and people like Barry Kelly and Marco Cantu come and go and apparently have different opinions on even fundamental issues. Even the Chief Scientist has to pitch a business case to get the time/manpower allotment to make changes. Once upon a time Delphi was a Windows-centric statically typed manually memory managed compiled language with a fixed IDE and GUI framework that was aimed at pretty-printing client/server database data in grids on Windows desktops. Yet now in the last few years both Windows and the desktop have been de-emphasized and the major development and marketing has been on cross-platform, write once compile anywhere primarily mobile development. The mobile versions of Delphi have automatic memory management and other significant changes and there is talk about 0-based strings, reduction in string types, immutable strings, desktop auto memory management, etc. coming about. Even the back end compiler itself is a target for replacement with an open source alternative.

What then really is "the zen of Delphi"? This is the kind of discussion I once hoped to have here, but various characters either call me a "troll", accuse me of "you want to turn Delphi into C# or Python!" or some other nonsense. People seem to want to be left in their little world rather than deal with these questions, which may not have comfortable answers. How can we talk about how to get people interested in Delphi when a large collection of people refuse to admit it isn't wildly popular, Anders posted a few weeks ago declaring that he "knew there were lots of American Delphi developers", etc.? How can we talk about where the next generation is going to come from if people don't want to admit the kids of today don't own RAD Studio Enterprise edition? How can we talk about how to jump-start the Delphi ecosystem when people won't admit it's collapsed? I've had David I. reply to a description of the absence of Delphi in education in the West with a claim about a contract to supply Delphi to some Mongolian schools (which of course in no way changes the facts) and Marco Cantu say that it's not fair to make the complaints about Delphi books that I was making since some of the self-published ones have been great (again, that they were great doesn't alter the fact that during the time in question - years - there were a total of two self-published books and no commercially published ones). I want to talk about how to jump-start the ecosystem, others want to scream "TIOBE doesn't mean anything!" every month. Several months ago I gave up any dreams of having serious discussions about the future of the language here. Again, per my original point, it's too emotional and personal for many that remain.

Insisting that
Delphi should drop begin/end blocks in favor of indentation is just downright stupid.

I don't "insist" anything. I tossed out some key items on my very long wish list. I care enough to have written down a literal list while coding with Delphi. I have zero say or control over anything that happens with Delphi so there's precisely zero consequence to anything I suggest; EMBT employees almost never even look at this forum. And if they did they're certainly not going to listen to me. In fact, "what I think EMBT will do with Delphi over the next 2 years" would be an entirely different list than my daydream wish list.

Not because indentation is wrong, but because it doesn't fit in Pascal ecosystem.

Remember the last line of Tim Peters' quote:

Good languages aren't random collections of
interchangeable features: they have a philosophy and internal coherence that's never profitably confused with their surface features.

Begin...end isn't even a surface feature so much as a syntax choice like ":=". Static typing is a core principle of Delphi... or more specifically, extremely specific, pervasive typing (for lack of a better phrase) is a core principle of Pascal. It's carried over to all of Wirth's subsequent languages and is practically unique to his creations other than those languages which set out to improve Delphi like Oxygene or Nimrod. Now, I've personally become more than a bit frustrated/disillusioned with static typing lately - but I didn't put it on my wish list as I do believe it would depart from a core philosophy of Pascal.

As I said before, BASIC dropped its line numbers and GOTO and adopted structured programming and it went on to become revitalized. Heck, Borland marketed a Turbo Basic http://en.wikipedia.org/wiki/Turbo_Basic that was compiled, had no line numbers and had subroutines in 87-88. Dijkstra has infamously said in 1975, "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." Modernizing the language and incorporating modern flow control concepts helped give it new popularity. Those changes were far more significant than begin...end.

There is plenty of room for improvements in Pascal language that can make it
more modern and powerfull, and more to your liking, but those improvements have
to be made consistent with what Pascal as language is.

I completely agree. I just disagree with small syntax features being a core component of the language (now what existing users would put up with changing is a different question entirely). Wikipedia talks about Pascal like this:

Wirth's intention was to create an efficient language (regarding both compilation speed and generated code) based on so-called structured
programming, a concept which had recently become popular. Pascal has its roots in the ALGOL 60 language, but also introduced concepts and
mechanisms which (on top of ALGOL's scalars and arrays) enabled programmers to define their own complex (structured) datatypes, and also
made it easier to build dynamic and recursive data structures such as lists, trees and graphs. Important features included for this were records,
enumerations, subranges, dynamically allocated variables with associated pointers, and sets. To make this possible and meaningful, Pascal
has a strong typing on all objects, which means that one type of data cannot be converted or interpreted as another without explicit
conversions. Similar mechanisms are standard in many programming languages today. .... Pascal, like many programming languages of today
(but unlike most languages in the C family), allows nested procedure definitions to any level of depth, and also allows most kinds of definitions
and declarations inside procedures and functions. This enables a very simple and coherent syntax where a complete program is syntactically
nearly identical to a single procedure or function (except for the keyword itself, of course.)

This to me does a very good job of summing up the design goals and linking them with particular features of the language.

As far as new languages (including Swift) are concerned, from perspective of person
that has not fired up Delphi for more than a month (and I have not been on vacation)
your comments can be rather insulting. I don't take them like that but others may.

Insulting to a person or insulting to Delphi?

I never said that it was not smart move for Apple, and I certainly like it more
than Objective-C. But people at Apple have made some mistakes in design too (in my opinion,
and I am not alone in such thinking). Without those mistakes Swift could have been even better.

All certainly valid points. My point in relation to Delphi was that Apple saw a need to take a language whose syntax was very different from some of the most popular languages today and reduce the complexity and add some more modern, convenient features. The consensus so far was that this was done to attract more developers to the iOS platform (Apple only has about 20% share of the smart phone market right now) and attempt to keep their app ecosystem in the lead. Apple has the advantage of a closed ecosystem they control. EMBT does it. This is going to be even more pressure on Delphi/Appmethod (and Digia with C++/Qt and maybe to a lesser degree on Xamarin). It makes some of the changes they've been talking about for some time now even more imperative (and honestly some of the things they haven't suggested, like type inference, even more important).

I saw that Marco has a blog post up simultaneously criticizing Swift and suggesting it's copied from Object Pascal and he's baffled why no tech writer sees that. I really like Marco so I've avoided reading this blog post so far. This sounds like quite a far-fetched claim and I don't if it's fear, jealousy or what.

InfoWorld wrote a piece criticizing Objective C just a few days before Swift was release. I don't think Marco wants to see one of their 9 complaints:

Stuck in the '80s

Parachute pants, big hair, "The Breakfast Club" -- and the NeXT machine: Objective-C is like a time machine in programming-language land.
The primitives aren't first-class citizens. Garbage collection, that wonderful idea that sustained Lisp, was adopted by Java ages ago. Objective-C
got it in 2006. The same goes for properties and closures. Wait. iOS never received garbage collection because no one wanted the iPhones to
hiccup. Hey, at least it's not Pascal or Ada.

And he's truly baffled why tech writers aren't comparing Swift to Pascal? Oh boy.

Anyway, I apologize for any offense or distress I may have caused you. I would attribute it to stupidity rather than malice. I appreciate the time you took to reflect on my post, and if I had it to do over, I would have removed the whole bit about cognitive dissonance. In my defense, certain prominent posters took a "It's just stupid and wrong because that's how I feel" approach the last time the subject of indentation came up here and also on Eric's DWScript blog and I was anticipating it again. Still, I should have reserved any comment like that unless/until someone bashed it without making an argument. I'm sorry.



Dalija Prasnikar
Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 13, 2014 1:42 AM   in response to: Joseph Mitzen in response to: Joseph Mitzen
Joseph Mitzen wrote:
Dalija Prasnikar wrote:

I have finally figured out what is wrong with your postings.

I thought the consensus was "that they exist".

(in context of forum where
most people prefer Pascal and have good reasons why they do so)

Sometimes it can be difficult to get people to talk about their good reasons for things.

Yes, it can. But that doesn't mean that we don't have good reasons, and that we
cannot give them. You just may not agree with our standpoint, just like we may
not agree with yours. Even when someone has firm and logical reasons that doesn't
mean that other side would accept them.

That is what makes it esoteric: syntax should not depend on formatting,
period....I am stating my preferences. I find it wrong. So to me, it is wrong.
Period.

I spent time laying out an argument under the assumption that we were discussing the facts and merits but in the end I got "It's just wrong, period." Nick and Q have expressed their distaste of significant indentation several times before but never explain why. Someone once started a thread about "the case for Delphi" and no one showed up to make the case. Mason infamously claimed he could write Delphi code as brief as Haskell and when it came time to do it declared that I just wouldn't understand his point and therefore he wasn't going to do it. Heck, I disagreed with him on Jim McKeeth's page where he tried arguing that distributed version control was inherently flawed/broken and the next day I discovered Mason has apparently used his blog's security software to block my IP from his blog! (The debate wasn't even on Mason's blog but on Jim's).

I have tried to give you better explanation, but you don't seem to get it. Never mind.
I would say that significant white space (indentation) is oxymoron. White space should
not carry any significance, because it is just illusion. Yes, when you look at python
code you can clearly see blocks, but problem is that those blocks are fragile in
a sense that you can easily change their meaning by accidentaly changing white
space - and such changes are not easily detected, unless you re-read the code
and folow its execution path.

I have already said that there are other means of assuring code correctness, like
testing, but when you hit GUI code that can be very hard to test I would rather
not rely on white space alone.


When that happens enough times it can become frustrating to say the least. It's hard to believe sometimes that people have good, rational reasons for their positions when they resist telling you what they are.

I know. Been there.

I am very, very far from being dinosaur that wants to live in the past and
never accept any progress.

I honestly don't believe I said that of anyone anywhere in this thread. My point about cognitive dissonance was that in earlier discussions no one laid out a clear reason for disliking it nor addressed its benefits. There's nothing wrong with having an emotional reason or simply preferring something to something else (books, movies, etc.) but when people call an alternative "wrong" or "nonsensical" or "flawed" or "broken" I expect them to be able to explain via facts and reasoning how they arrived at that conclusion. Otherwise it's like being asked your favorite color and then being told your answer is "wrong".

It is not always easy to say why something just feels wrong. And sometimes,
when you can pinpoint why, your facts are not always viewed as facts by others.
That is why some non-tech threads go on forever.

Almost any time Oxygene gest some new
great feature it makes me want to cry because I know that I can only
dream of having something like that in Delphi.

Fair enough, but for a certain significant minority here, almost any time any language gets - or is even acknowledged by anyone to have - a great feature, they scream that this is just "a fad" either added "for no reason" or "to look cool". And if you want that new feature, you're just lazy and stupid and not a genius like them. On the DH blog I was complaining about the Delphi dateutils library (which doesn't even use objects and is what I consider the worst library in the VCL). I was then asked if I wasn't a good enough programmer to implement everything in classes myself. :-(

Agreed.


We can have differences of opinion about braces, indentation, case sensitivity
or whatever you like, but there are some things that make Pascal what it is
and you have to give suggestions withing those boundaries.

That's an interesting thought. Raymond Hettinger calls this "zen" - a set of guiding principles or goals that define a language. Tim Peters once put Python creator Guido Van Rossum's design philosophy as he saw it into a little set of koans called "The Zen Of Python". Eiffel's creator Bertrand Meyer wrote a book, "Object-Oriented Software Construction" that outlined his design philosophy. Ruby's creator had a set of design goals. So if someone wants to decide whether something is "pythonic" or belongs in Eiffel, they can quote one of the lines of The Zen Of Python or say "Meyer writes on page 124 that....".

Tim Peters put it this way....

The problem I have with "SETL sets" in Python is the same I have with every other language's "killer core" in Python: SETL is much more than
just "a set type", Eiffel is much more than just fancy pre- and post- conditions, Perl's approach to regexps is much more than just its isolated
regexp syntax, Scheme is much more than just first-class functions & lexical closures, and so on. Good languages aren't random collections of
interchangeable features: they have a philosophy and internal coherence that's never profitably confused with their surface features.

Some languages don't have "zen". Raymond Hettinger was on the C++ design committee - which he said had hundreds or thousands of people on it and one got on it mostly just by saying one wanted to be. C++ is literally designed by committee such that individual parts may be coherent but there is not an overall design process going on.

The question that needs to be answered first then when addressing your concern is "Does Delphi have Zen?" I don't think I've ever seen anyone tackle that question. Wirth had some design goals, but the original Pascal that emerged was not suitable for professional software development (for instance strings were very flawed, per Wirth's own admission). Marketers of commercial Pascal compilers tried fixing these problems - each in their own way. There was eventually an ISO standard, but no one really followed it. Delphi lost its key guru early on to Microsoft. Unlike Python and Ruby which have a "BDFL" (Benevolent Dictator For Life) who will make the final call about what goes into the language, Delphi doesn't have this.The language doesn't even have a formal written grammar. Joe White once produced a grammar for Delphi and observed, euphemistically, that it was clear that the language "had developed organically" rather than "being designed from the beginning to be easy to write tools for". He gave many examples of the ways in which "Delphi is full of ambiguity" and thus why he needed to write a parser by hand.

I agree that Delphi has not always grown in logical direction. And I am truly sorry that some
features were not more thought of and discussed before their implementation. But, most
of the time it has been expanded in a right way.


What then really is "the zen of Delphi"? This is the kind of discussion I once hoped to have here, but various characters either call me a "troll", accuse me of "you want to turn Delphi into C# or Python!" or some other nonsense. People seem to want to be left in their little world rather than deal with these questions, which may not have comfortable answers. How can we talk about how to get people interested in Delphi when a large collection of people refuse to admit it isn't wildly popular, Anders posted a few weeks ago declaring that he "knew there were lots of American Delphi developers", etc.? How can we talk about where the next generation is going to come from if people don't want to admit the kids of today don't own RAD Studio Enterprise edition? How can we talk about how to jump-start the Delphi ecosystem when people won't admit it's collapsed? I've had David I. reply to a description of the absence of Delphi in education in the West with a claim about a contract to supply Delphi to some Mongolian schools (which of course in no way changes the facts) and Marco Cantu say that it's not fair to make the complaints about Delphi books that I was making since some of the self-published ones have been great (again, that they were great doesn't alter the fact that during the time in question - years - there were a total of two self-published books and no commercially published ones). I want to talk about how to jump-start the ecosystem, others want to scream "TIOBE doesn't mean anything!" every month. Several months ago I gave up any dreams of having serious discussions about the future of the language here. Again, per my original point, it's too emotional and personal for many that remain.

Like I said earlier, there is your problem. You are pushing a bit too hard. Not that we are unable
to have decent discussion about what Delphi is and what it should be and how it can be improved,
but when you start poking around begin/end, interface/implementation sections or stuff then
you push yourself on the troll side.

I was talking about boundaries before, so I will make them more clearer: if you want to discuss
changes where current code would no longer compile with new compilers (I am not talking about
logical errors in compiler that should have to be fixed), or basic syntax changes where new code
would no longer compile in old compilers (like removing begin/end) then you are going too far.
First, because people will not listen all the good things you have to say, and second such changes
are not going to happen. So efectively it is a time wasted.

We can discuss, whether significant indentation is better than block delimiters, but you are hinting
that Delphi should change it's syntax to embrace significant indentation and that is breaking point.


Insisting that
Delphi should drop begin/end blocks in favor of indentation is just downright stupid.

I don't "insist" anything. I tossed out some key items on my very long wish list. I care enough to have written down a literal list while coding with Delphi. I have zero say or control over anything that happens with Delphi so there's precisely zero consequence to anything I suggest; EMBT employees almost never even look at this forum. And if they did they're certainly not going to listen to me. In fact, "what I think EMBT will do with Delphi over the next 2 years" would be an entirely different list than my daydream wish list.

That is it. Widh list for Delphi cannot include significant indentation ;-)


Not because indentation is wrong, but because it doesn't fit in Pascal ecosystem.

Remember the last line of Tim Peters' quote:

Good languages aren't random collections of
interchangeable features: they have a philosophy and internal coherence that's never profitably confused with their surface features.

Begin...end isn't even a surface feature so much as a syntax choice like ":=". Static typing is a core principle of Delphi... or more specifically, extremely specific, pervasive typing (for lack of a better phrase) is a core principle of Pascal. It's carried over to all of Wirth's subsequent languages and is practically unique to his creations other than those languages which set out to improve Delphi like Oxygene or Nimrod. Now, I've personally become more than a bit frustrated/disillusioned with static typing lately - but I didn't put it on my wish list as I do believe it would depart from a core philosophy of Pascal.

As I said before, BASIC dropped its line numbers and GOTO and adopted structured programming and it went on to become revitalized. Heck, Borland marketed a Turbo Basic http://en.wikipedia.org/wiki/Turbo_Basic that was compiled, had no line numbers and had subroutines in 87-88. Dijkstra has infamously said in 1975, "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." Modernizing the language and incorporating modern flow control concepts helped give it new popularity. Those changes were far more significant than begin...end.

Whether you like it or not, syntax is part of language's features. It cannot be easily changed.
If you do change something then you must have good reasons, and changes should bring
significant improvements for benefit of all.

And while you say that significant indentation is better and more modern, there are plenty of
new and modern languages that insist on having block delimiters of some kind.


There is plenty of room for improvements in Pascal language that can make it
more modern and powerfull, and more to your liking, but those improvements have
to be made consistent with what Pascal as language is.

I completely agree. I just disagree with small syntax features being a core component of the language (now what existing users would put up with changing is a different question entirely). Wikipedia talks about Pascal like this:

Ok, here is where we disagree. I have chosen Pascal way back because I liked
it's small syntax features more than C. Of course, there were more significant features too
that made the difference.


As far as new languages (including Swift) are concerned, from perspective of person
that has not fired up Delphi for more than a month (and I have not been on vacation)
your comments can be rather insulting. I don't take them like that but others may.

Insulting to a person or insulting to Delphi?

To a person.

I never said that it was not smart move for Apple, and I certainly like it more
than Objective-C. But people at Apple have made some mistakes in design too (in my opinion,
and I am not alone in such thinking). Without those mistakes Swift could have been even better.

All certainly valid points. My point in relation to Delphi was that Apple saw a need to take a language whose syntax was very different from some of the most popular languages today and reduce the complexity and add some more modern, convenient features. The consensus so far was that this was done to attract more developers to the iOS platform (Apple only has about 20% share of the smart phone market right now) and attempt to keep their app ecosystem in the lead. Apple has the advantage of a closed ecosystem they control. EMBT does it. This is going to be even more pressure on Delphi/Appmethod (and Digia with C++/Qt and maybe to a lesser degree on Xamarin). It makes some of the changes they've been talking about for some time now even more imperative (and honestly some of the things they haven't suggested, like type inference, even more important).

Apple is in quite different position than Embarcadero. I don't think that Embarcadero
has the power to introduce brand new language, and possibly they will never have.
They have to work within Object Pascal boundaries, respecting existing code. I know
that this is not always easy, and that legacy can be burden at times, but that is just
the way it is.


Anyway, I apologize for any offense or distress I may have caused you. I would attribute it to stupidity rather than malice. I appreciate the time you took to reflect on my post, and if I had it to do over, I would have removed the whole bit about cognitive dissonance. In my defense, certain prominent posters took a "It's just stupid and wrong because that's how I feel" approach the last time the subject of indentation came up here and also on Eric's DWScript blog and I was anticipating it again. Still, I should have reserved any comment like that unless/until someone bashed it without making an argument. I'm sorry.

I was never offended by your writings, I always try to read beyond words and
capture true intent. I don't think you have ever intended to insult anyone, but
I am pointing out some of mistakes in your approach where others may completely
fail to see real nature of your posts.

At the end, we all can be a bit frustrated at times, and sometimes we write things
without thinking.

Dalija Prasnikar
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 13, 2014 2:47 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:

I would say that significant white space
(indentation) is oxymoron. White space should not carry any
significance, because it is just illusion.

No it isn't! White space is made up of characters, just like anything
else. The significance of white space is in its shape and size. Yes,
that's different from the way visible characters have individual
meaning, but you CAN give white space significance if you choose to.

I don't understand why you can't see that. In Pascal, white space does
not have significance. In Python, it does. This is self-evident, so
how can you deny it? How can it be an illusion when it's right there
on every page of Python?

Yes, when you look at
python code you can clearly see blocks, but problem is that those
blocks are fragile in a sense that you can easily change their
meaning by accidentaly changing white space

Well, of course! You can change the meaning of any code by
accidentally changing it! I assume your point is: are accidental white
space changes more likely to happen? I'm not sure, but perhaps it
depends on what you are used to. I feel this is something we would
need to research, rather than just letting the assertion stand.

- and such changes are
not easily detected, unless you re-read the code and folow its
execution path.

Again, I'm not convinced such changes are not easily detected. You are
making an assertion here: I think we'd need to conduct some tests to
see if this is a real issue or an imagined one.

I was talking about boundaries before, so I will make them more
clearer: if you want to discuss changes where current code would no
longer compile with new compilers (I am not talking about logical
errors in compiler that should have to be fixed), or basic syntax
changes where new code would no longer compile in old compilers (like
removing begin/end) then you are going too far.

Outrageous! Since when did you get to decide what is going too far for
this newsgroup, Dalija? That decision is in the gift of Embarcadero
only. Yes, I realise you then try to justify it:

First, because
people will not listen all the good things you have to say, and
second such changes are not going to happen. So efectively it is a
time wasted.

No, no! Are you suggesting that we shouldn't talk about things that
won't get implemented? That's ridiculous! The traffic in
non-technical would fall to one tenth! :-)

By having these wide-ranging, free-form discussions about our personal
wish-lists and "If I were in charge this is what I'd do" debates we
are: a/ having fun; b/ learning new ideas from each other; c/ sometimes
being forced to confront our preconceptions and prejudices. All of
these things are beneficial and lead to personal growth and development.

It is a joy to have such unconstrained discussions!

--
SteveT

Dalija Prasnikar

Posts: 2,325
Registered: 11/9/99
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 13, 2014 3:01 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:
Dalija Prasnikar wrote:

I would say that significant white space
(indentation) is oxymoron. White space should not carry any
significance, because it is just illusion.

No it isn't! White space is made up of characters, just like anything
else. The significance of white space is in its shape and size. Yes,
that's different from the way visible characters have individual
meaning, but you CAN give white space significance if you choose to.

You can give it significance, but it doesn't make it more "visible".

I don't understand why you can't see that. In Pascal, white space does
not have significance. In Python, it does. This is self-evident, so
how can you deny it? How can it be an illusion when it's right there
on every page of Python?

I am not denying it that it has significance in Python, I am claiming that
white space on it's own is not significant, because it is not something
you can hold on to. I am not sure how to explain it better.

Yes, when you look at
python code you can clearly see blocks, but problem is that those
blocks are fragile in a sense that you can easily change their
meaning by accidentaly changing white space

Well, of course! You can change the meaning of any code by
accidentally changing it! I assume your point is: are accidental white
space changes more likely to happen? I'm not sure, but perhaps it
depends on what you are used to. I feel this is something we would
need to research, rather than just letting the assertion stand.

I know that it may be assertion, but hitting delete by mistake is easy,
seeing that mistake in Python can be much harder to detect than
in other languages.

- and such changes are
not easily detected, unless you re-read the code and folow its
execution path.

Again, I'm not convinced such changes are not easily detected. You are
making an assertion here: I think we'd need to conduct some tests to
see if this is a real issue or an imagined one.

I am not quite sure how we could do that. The only way would be to collect
opinions about that issue from more Pythin developers, and how often they
have found themselves in similar position.

I was talking about boundaries before, so I will make them more
clearer: if you want to discuss changes where current code would no
longer compile with new compilers (I am not talking about logical
errors in compiler that should have to be fixed), or basic syntax
changes where new code would no longer compile in old compilers (like
removing begin/end) then you are going too far.

Outrageous! Since when did you get to decide what is going too far for
this newsgroup, Dalija? That decision is in the gift of Embarcadero
only. Yes, I realise you then try to justify it:

I am not trying to prevent people from saying what they think, I am just
trying to say that if they go beyond some boundaries their voice can
be discarded. An I would not want that from happening, because I think
they have plenty of valid things to say.

First, because
people will not listen all the good things you have to say, and
second such changes are not going to happen. So efectively it is a
time wasted.

No, no! Are you suggesting that we shouldn't talk about things that
won't get implemented? That's ridiculous! The traffic in
non-technical would fall to one tenth! :-)

LOL

By having these wide-ranging, free-form discussions about our personal
wish-lists and "If I were in charge this is what I'd do" debates we
are: a/ having fun; b/ learning new ideas from each other; c/ sometimes
being forced to confront our preconceptions and prejudices. All of
these things are beneficial and lead to personal growth and development.

It is a joy to have such unconstrained discussions!

Maybe, I am just getting too frustrated because changes I would like to see
are not happening, and because we are not having any proper discussions
about such changes where devs from Embarcadero could step in to bring
their POV.

Dalija Prasnikar
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 13, 2014 6:19 AM   in response to: Dalija Prasnikar in response to: Dalija Prasnikar
Dalija Prasnikar wrote:

Maybe, I am just getting too frustrated because changes I would like
to see are not happening, and because we are not having any proper
discussions about such changes where devs from Embarcadero could step
in to bring their POV.

That is an absolutely reasonable comment, and I do appreciate the
frustration you must feel.

However, I think there is room for "Wouldn't it be nice if....." and
"If I were in charge of Embarcadero....." conversations alongside those
more rooted in reality.

Dalija, it may be that you must be the one to start the "proper"
discussions, although we don't get to see very much of our Embarcadero
friends hereabouts, sadly.

--
SteveT
Anders Isaksson


Posts: 30
Registered: 4/15/00
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 16, 2014 7:28 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Again, I'm not convinced such changes are not easily detected.

In Pascal, begin-end must be paired, just like parenthesis, brackets
etc. This means that a pretty-printer can create the indentation that
makes it easier to see the structure. You (or an analyzing program) can
quickly see if there's an 'end' missing, for example.

Whitespace doesn't come in pairs, which means that it is much more
difficult to do the same analysis with software for that case.
Steve Thackery

Posts: 151
Registered: 4/29/06
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 16, 2014 7:59 AM   in response to: Anders Isaksson in response to: Anders Isaksson
Anders Isaksson wrote:

Whitespace doesn't come in pairs, which means that it is much more
difficult to do the same analysis with software for that case.

Yes, but you're talking about software, and I was talking about a human
looking at the code.

We were at cross-purposes, it seems. :-)

--
SteveT
Anders Isaksson


Posts: 30
Registered: 4/15/00
Re: New Apple programming language?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 17, 2014 5:29 AM   in response to: Steve Thackery in response to: Steve Thackery
Steve Thackery wrote:

Anders Isaksson wrote:

Whitespace doesn't come in pairs, which means that it is much more
difficult to do the same analysis with software for that case.

Yes, but you're talking about software, and I was talking about a
human looking at the code.

We were at cross-purposes, it seems. :-)

As we are only human, we need help from the software...

I have never denied the necessity of correct indentation for the ease
of seeing the block structure.

The difference between block-delimiting symbols and whitespace is that
with block-delimiters, a prettyprinter can give you quick feedback that
what you wrote is probably not what you meant (as the structure is
unbalanced), while the whitespace version assumes silently that you
wrote what you meant, and gives no possibility to double-check.