f



C# new features (v.7)

I've come across a list of new features in the upcoming version of C#.
Funnily, a good half are already in Ada - four of them actually already in =
Ada 1983 !
I've marked here with a '*' those items, a '.' items where I think a simila=
r feature exists and '-' where I think the feature doesn't exist in Ada.
Comments and corrections are welcome.

*  Feature # 1 - Binary literals
*  Feature # 2 - Digit Separators
*  Feature # 3 - Tuple data type now available as Value type
..  Feature # 4 - Out parameters now have a fluid usage
*  Feature # 5 - Local functions
..  Feature # 6 - Ref returns and ref locals
*  Feature # 7 - New possibility for throw expressions
-  Feature # 8 - New possibility for lambda expression bodied methods
-  Feature # 9 - Pattern matching for types

Perhaps an Ada support by Microsoft anytime soon ?...
_________________________
Gautier's Ada programming
http://gautiersblog.blogspot.com/search/label/Ada=20
NB: Pour une r=C3=A9ponse directe, adresse e-mail valable par le lien ci-de=
ssus
0
gautier_niouzes
12/14/2016 1:29:45 PM
comp.lang.ada 8774 articles. 2 followers. Post Follow

28 Replies
632 Views

Similar Articles

[PageSpeed] 33

On 12/14/2016 7:29 AM, gautier_niouzes@hotmail.com wrote:
> I've come across a list of new features in the upcoming version of C#.
> Funnily, a good half are already in Ada - four of them actually already in Ada 1983 !
> I've marked here with a '*' those items, a '.' items where I think a similar feature exists and '-' where I think the feature doesn't exist in Ada.
> Comments and corrections are welcome.
>
> *  Feature # 1 - Binary literals
> *  Feature # 2 - Digit Separators
> *  Feature # 3 - Tuple data type now available as Value type
> .  Feature # 4 - Out parameters now have a fluid usage
> *  Feature # 5 - Local functions
> .  Feature # 6 - Ref returns and ref locals
> *  Feature # 7 - New possibility for throw expressions
> -  Feature # 8 - New possibility for lambda expression bodied methods
> -  Feature # 9 - Pattern matching for types
>
> Perhaps an Ada support by Microsoft anytime soon ?...
> _________________________
> Gautier's Ada programming
> http://gautiersblog.blogspot.com/search/label/Ada
> NB: Pour une réponse directe, adresse e-mail valable par le lien ci-dessus
>

Along the same thought, Python 3.6, which came out just 2 days ago,
has new features, and quick look shows many are
allreadyin Ada for 30 years or more.

https://docs.python.org/3.6/whatsnew/3.6.html

-- PEP 515, underscores in numeric literals.
"adds the ability to use underscores in numeric
literals for improved readability"

-- PEP 526, syntax for variable annotations.
"introduced the standard for type annotations of
function parameters, a.k.a. type hints"

(poor man's way of adding data type declaration? :)

PEP 492 introduced support for native coroutines and async / await syntax
(Ada tasks?)

etc...

Many "modern" languages are adding "new" features, which are
allready in Ada for 10's of years, Hummm.... May be Ada
needs a better marketing department :)

--Nasser








0
Nasser
12/14/2016 4:59:42 PM
On Wednesday, December 14, 2016 at 6:29:47 AM UTC-7, gautier...@hotmail.com wrote:
> I've come across a list of new features in the upcoming version of C#.
> Funnily, a good half are already in Ada - four of them actually already in Ada 1983 !

That's really interesting, and slightly funny, and slightly sad.

> I've marked here with a '*' those items, a '.' items where I think a similar feature exists and '-' where I think the feature doesn't exist in Ada.
> Comments and corrections are welcome.
> 
> *  Feature # 1 - Binary literals
> *  Feature # 2 - Digit Separators
> *  Feature # 3 - Tuple data type now available as Value type
> .  Feature # 4 - Out parameters now have a fluid usage
> *  Feature # 5 - Local functions
> .  Feature # 6 - Ref returns and ref locals
> *  Feature # 7 - New possibility for throw expressions
> -  Feature # 8 - New possibility for lambda expression bodied methods
> -  Feature # 9 - Pattern matching for types
> 
> Perhaps an Ada support by Microsoft anytime soon ?...

Do you have a link to this information?
0
Shark8
12/14/2016 7:28:06 PM
On Wednesday, December 14, 2016 at 9:59:55 AM UTC-7, Nasser M. Abbasi wrote:
> 
> Many "modern" languages are adding "new" features, which are
> allready in Ada for 10's of years, Hummm.... Maybe Ada
> needs a better marketing department :)

That's almost certain.
0
Shark8
12/14/2016 7:28:48 PM
On Wednesday, December 14, 2016 at 8:59:55 AM UTC-8, Nasser M. Abbasi wrote=
:
> Many "modern" languages are adding "new" features, which are
> allready in Ada for 10's of years, Hummm.... May be Ada
> needs a better marketing department :)
>=20
> --Nasser

What Ada really needs is to be used in fancy/cool/fun applications (e.g. ga=
mes). Better marketing for the same old arguments of safety critical softwa=
re, reduced development/maintenance cost, software integrity, etc (which ar=
e ALL still very important and worth promoting) doesn't capture the interes=
t of the younger generation of software developers. It just turns them away=
, if not put them to sleep. (Projects like Gnoga are definitely a good star=
t..)

I have no doubt that Ada's exposure to the masses would have been greatly h=
elped if people could make iOS apps with Ada when iPhones first became popu=
lar. Still no iOS apps in Ada (as far as I know)... =3D( Yes, you can make =
Android apps, but are there any that will make the general mass go "Wow!". =
Also, iOS is more popular...

I REALLY wish I could be more proactive on this topic, but life responsibil=
ities and reality continue to prevent me from allocating enough time to con=
tribute anything to the Ada community...Maybe one day? Sigh...for now, I am=
 stuck using an inferior one letter named language in a company full of ant=
i-Ada software engineers...=3D'(
0
Wesley
12/14/2016 7:52:05 PM
"Wesley Pan" <wesley.y.pan@gmail.com> wrote in message 
news:276a2153-b81f-4e19-9615-530e798e5798@googlegroups.com...
>I have no doubt that Ada's exposure to the masses would have been
>greatly helped if people could make iOS apps with Ada when iPhones
>first became popular.

Given that Apple wouldn't allow apps in the iTunes store unless they are 
written in one of their "approved" languages and implementations, the odds 
of an Ada iPhone app at the start was none. Taking on Apple's lawyers was 
unlikely to be a winning game unless you are big enough to bully them back 
(i.e. Samsung and Google).

That situation may have changed, but in any case apps don't play to Ada's 
strengths. Most are 99% GUI, doing little of the calculations that Ada would 
help with.

                                   Randy.


0
Randy
12/14/2016 11:01:05 PM
> That's really interesting, and slightly funny, and slightly sad.

I find a good thing that Microsoft, accidentally or not, considers Ada as a main language development goal.

> Do you have a link to this information?

https://www.codeproject.com/Articles/1156167/Csharp-Version-Introduction-to-new-language-featur
_________________________ 
Gautier's Ada programming 
http://sf.net/users/gdemont/
0
gautier_niouzes
12/15/2016 12:13:51 AM
On 14/12/16 20:28, Shark8 wrote:
> On Wednesday, December 14, 2016 at 6:29:47 AM UTC-7, gautier...@hotmail.com wrote:
>> I've come across a list of new features in the upcoming version of C#.
>> Funnily, a good half are already in Ada - four of them actually already in Ada 1983 !
>
> That's really interesting, and slightly funny, and slightly sad.

It's very sad. I can't say how much I miss range-constrained numeric 
types in Java/C++. Another Ada'83-ism to be rediscovered.

And tasking? Every time I see C++ people fumbling with low-level 
semaphores I want to cry. No language (that I know) comes even near Ada 
tasks + protected combo. No wonder multithreading is sold as some kind 
of miracle when some program uses it properly.

Sad Álex.

>
>> I've marked here with a '*' those items, a '.' items where I think a similar feature exists and '-' where I think the feature doesn't exist in Ada.
>> Comments and corrections are welcome.
>>
>> *  Feature # 1 - Binary literals
>> *  Feature # 2 - Digit Separators
>> *  Feature # 3 - Tuple data type now available as Value type
>> .  Feature # 4 - Out parameters now have a fluid usage
>> *  Feature # 5 - Local functions
>> .  Feature # 6 - Ref returns and ref locals
>> *  Feature # 7 - New possibility for throw expressions
>> -  Feature # 8 - New possibility for lambda expression bodied methods
>> -  Feature # 9 - Pattern matching for types
>>
>> Perhaps an Ada support by Microsoft anytime soon ?...
>
> Do you have a link to this information?
>

0
Alejandro
12/15/2016 12:49:18 PM
On 14/12/16 20:52, Wesley Pan wrote:
> On Wednesday, December 14, 2016 at 8:59:55 AM UTC-8, Nasser M. Abbasi wrote:
>> Many "modern" languages are adding "new" features, which are
>> allready in Ada for 10's of years, Hummm.... May be Ada
>> needs a better marketing department :)
>>
>> --Nasser
>
> What Ada really needs is to be used in fancy/cool/fun applications (e.g. games). Better marketing for the same old arguments of safety critical software, reduced development/maintenance cost, software integrity, etc (which are ALL still very important and worth promoting) doesn't capture the interest of the younger generation of software developers. It just turns them away, if not put them to sleep. (Projects like Gnoga are definitely a good start..)
>
> I have no doubt that Ada's exposure to the masses would have been greatly helped if people could make iOS apps with Ada when iPhones first became popular. Still no iOS apps in Ada (as far as I know)... =( Yes, you can make Android apps, but are there any that will make the general mass go "Wow!". Also, iOS is more popular...
>
> I REALLY wish I could be more proactive on this topic, but life responsibilities and reality continue to prevent me from allocating enough time to contribute anything to the Ada community...Maybe one day? Sigh...for now, I am stuck using an inferior one letter named language in a company full of anti-Ada software engineers...='(
>

I don't think any amount of cool apps can win people over the obvious 
short-term advantages of trendy languages. First, it is much 
faster/simpler to get something going in one of the dynamic, 
garbage-collected languages. Ada instead greets newbies with 
fixed-length strings. Second, even with Ada on the lead on most 
engineering-desirable properties, still has a syntax that is too 
clunky/carries too much old baggage for people used to "fancy" new 
languages and not interested in solid engineering. And I'm not referring 
to verbosity: I mean the inconsistent dot notation, syntax differences 
for regular/tagged/synchronized types, the complex reference return 
"types" via aspects with auxiliary types, the hindrance of 
definite/indefinite types (see the standard Containers with everything 
duplicated, or (albeit unrelated) Strings with /triple/ versions, that 
has to hurt any programmer's good taste). Throw in limitedness for good 
measure.

Now, I know there are reasons for those, and even so I resent some of 
them to some extent. In the end, as has been said in this group in the 
past, I think people interested in the areas where Ada still shines can 
learn to love it, whereas the main lot are only interested in doing 
whatever is cool now as fast and if needed be as buggily as possible. 
That's why I think that saying that Ada make planes/satellites fly will 
do more for the realistic potential audience than any cool app.

Cheers,
Alex
0
Alejandro
12/15/2016 2:19:22 PM
I would disagree with point #3.

Le mercredi 14 d=C3=A9cembre 2016 14:29:47 UTC+1, gautier...@hotmail.com a =
=C3=A9crit=C2=A0:
> I've come across a list of new features in the upcoming version of C#.
> Funnily, a good half are already in Ada - four of them actually already i=
n Ada 1983 !
> I've marked here with a '*' those items, a '.' items where I think a simi=
lar feature exists and '-' where I think the feature doesn't exist in Ada.
> Comments and corrections are welcome.
>=20
> *  Feature # 1 - Binary literals
> *  Feature # 2 - Digit Separators
> *  Feature # 3 - Tuple data type now available as Value type

While this feature is mostly about record aggregates, they add to it the ab=
ility to declare anonymous record types, which would never land in Ada. So =
I would call it a '.'.


> .  Feature # 4 - Out parameters now have a fluid usage
> *  Feature # 5 - Local functions
> .  Feature # 6 - Ref returns and ref locals
> *  Feature # 7 - New possibility for throw expressions
> -  Feature # 8 - New possibility for lambda expression bodied methods
> -  Feature # 9 - Pattern matching for types
>=20
> Perhaps an Ada support by Microsoft anytime soon ?...

Considering the quality of their C++ compiler, I would rather NOT have Micr=
osoft becoming popular in the Ada ecosystem :)

Hadrien
0
Hadrien
12/16/2016 7:47:02 AM
Le mercredi 14 d=C3=A9cembre 2016 17:59:55 UTC+1, Nasser M. Abbasi a =C3=A9=
crit=C2=A0:
> Along the same thought, Python 3.6, which came out just 2 days ago,
> has new features, and quick look shows many are
> allreadyin Ada for 30 years or more.
>=20
> https://docs.python.org/3.6/whatsnew/3.6.html
>=20
> -- PEP 515, underscores in numeric literals.
> "adds the ability to use underscores in numeric
> literals for improved readability"
>=20
> -- PEP 526, syntax for variable annotations.
> "introduced the standard for type annotations of
> function parameters, a.k.a. type hints"
>=20
> (poor man's way of adding data type declaration? :)
>=20
> PEP 492 introduced support for native coroutines and async / await syntax
> (Ada tasks?)

Not quite. Coroutines are about lightweight cooperative multitasking (user =
specifies when to switch to another task, through some syntaxic sugar), whe=
reas the implementation of Ada tasks is left up to the implementation, and =
in GNAT is based on heavyweight preemptive threads.


>=20
> etc...
>=20
> Many "modern" languages are adding "new" features, which are
> allready in Ada for 10's of years, Hummm.... May be Ada
> needs a better marketing department :)
>=20
> --Nasser

0
Hadrien
12/16/2016 7:49:39 AM
Le jeudi 15 d=C3=A9cembre 2016 01:13:53 UTC+1, gautier...@hotmail.com a =C3=
=A9crit=C2=A0:
> > That's really interesting, and slightly funny, and slightly sad.
>=20
> I find a good thing that Microsoft, accidentally or not, considers Ada as=
 a main language development goal.

Maybe related to the fact that the designer of C#, Anders Hejlsberg, came f=
rom a Pascal (Delphi) background.

>=20
> > Do you have a link to this information?
>=20
> https://www.codeproject.com/Articles/1156167/Csharp-Version-Introduction-=
to-new-language-featur
> _________________________=20
> Gautier's Ada programming=20
> http://sf.net/users/gdemont/

0
Hadrien
12/16/2016 7:52:16 AM
Le jeudi 15 d=C3=A9cembre 2016 13:49:20 UTC+1, Alejandro R. Mosteo a =C3=A9=
crit=C2=A0:
> On 14/12/16 20:28, Shark8 wrote:
> > On Wednesday, December 14, 2016 at 6:29:47 AM UTC-7, gautier...@hotmail=
..com wrote:
> >> I've come across a list of new features in the upcoming version of C#.
> >> Funnily, a good half are already in Ada - four of them actually alread=
y in Ada 1983 !
> >
> > That's really interesting, and slightly funny, and slightly sad.
>=20
> It's very sad. I can't say how much I miss range-constrained numeric=20
> types in Java/C++. Another Ada'83-ism to be rediscovered.
>=20
> And tasking? Every time I see C++ people fumbling with low-level=20
> semaphores I want to cry. No language (that I know) comes even near Ada=
=20
> tasks + protected combo. No wonder multithreading is sold as some kind=20
> of miracle when some program uses it properly.

To be fair, Ada has no equivalent to C++'s portable atomics either. C++ the=
se days is mostly marketed as a low-level infrastructure to build performan=
ce-critical libraries in, whereas Ada is more designed like a high-level en=
d-user solution, and these diverging design goals lead to different design =
choices.


> Sad =C3=81lex.

0
Hadrien
12/16/2016 7:55:47 AM
Wesley Pan <wesley.y.pan@gmail.com> wrote:

> 
> What Ada really needs is to be used in fancy/cool/fun applications (e.g. games). 

I couldn't agree more. SDLAda is a start there.

Better marketing for the same old arguments of safety critical software,
reduced development/maintenance cost, software integrity, etc (which are
ALL still very important and worth promoting) doesn't capture the interest
of the younger generation of software developers. It just turns them away,
if not put them to sleep. 

Yup. Need to get younger people excited but seems only a few of us actually
see this.

(Projects like Gnoga are definitely a good start..)
> 
> I have no doubt that Ada's exposure to the masses would have been greatly
> helped if people could make iOS apps with Ada when iPhones first became
> popular. Still no iOS apps in Ada (as far as I know)... =( Yes, you 

I've looked at this, Apple never sent their patches to mainline, they've
now gone LLVM. I have considered doing a port of the Darwin stuff to ARM,
don't hold your breath though.

can make Android apps, but are there any that will make the general mass go
"Wow!". Also, iOS is more popular...

Also gone LLVM.

> 
> I REALLY wish I could be more proactive on this topic, but life
> responsibilities and reality continue to prevent me from allocating
> enough time to contribute anything to the Ada community...Maybe one day?
> Sigh...for now, I am stuck using an inferior one letter named language in
> a company full of anti-Ada software engineers...='(
> 

Yes we need more.

We had a talk about this on irc the other day, the shitty state of Ada
often comes up. Flyx basically said one of the reasons he left Ada was
because of the lack of libs and other being that bindings take ages to
create. I can sympathise with that, it really does and you end up burning
out so you end up taking long breaks away.

Shame.


0
Luke
12/16/2016 8:34:14 AM
Randy Brukardt <randy@rrsoftware.com> wrote:
> "Wesley Pan" <wesley.y.pan@gmail.com> wrote in message 
> news:276a2153-b81f-4e19-9615-530e798e5798@googlegroups.com...
>> I have no doubt that Ada's exposure to the masses would have been
>> greatly helped if people could make iOS apps with Ada when iPhones
>> first became popular.
> 
> Given that Apple wouldn't allow apps in the iTunes store unless they are 
> written in one of their "approved" languages and implementations, the odds 

No longer the case. Any language is allowed now. 


0
Luke
12/16/2016 10:03:29 AM
<gautier_niouzes@hotmail.com> wrote:
>> That's really interesting, and slightly funny, and slightly sad.
> 
> I find a good thing that Microsoft, accidentally or not, considers Ada as
> a main language development goal.
> 

What? Where's this from? A goal for what?
0
Luke
12/16/2016 10:08:18 AM
On 16/12/16 08:55, Hadrien Grasland wrote:
> Le jeudi 15 décembre 2016 13:49:20 UTC+1, Alejandro R. Mosteo a écrit :
>> On 14/12/16 20:28, Shark8 wrote:
>>> On Wednesday, December 14, 2016 at 6:29:47 AM UTC-7, gautier...@hotmail.com wrote:
>>>> I've come across a list of new features in the upcoming version of C#.
>>>> Funnily, a good half are already in Ada - four of them actually already in Ada 1983 !
>>>
>>> That's really interesting, and slightly funny, and slightly sad.
>>
>> It's very sad. I can't say how much I miss range-constrained numeric
>> types in Java/C++. Another Ada'83-ism to be rediscovered.
>>
>> And tasking? Every time I see C++ people fumbling with low-level
>> semaphores I want to cry. No language (that I know) comes even near Ada
>> tasks + protected combo. No wonder multithreading is sold as some kind
>> of miracle when some program uses it properly.
>
> To be fair, Ada has no equivalent to C++'s portable atomics either. C++ these days is mostly marketed as a low-level infrastructure to build performance-critical libraries in, whereas Ada is more designed like a high-level end-user solution, and these diverging design goals lead to different design choices.

Yep, C++ is adding tons of useful thing to the standard libs after the 
11/14 iterations. Actually, with the newest versions you can get rid of 
many bad practices, I'd say it's even very confy to write in. The heavy 
templating and crypotsyntax however still scare me the moment I have to 
check library code.

0
Alejandro
12/16/2016 12:43:25 PM
On Fri, 16 Dec 2016 10:08:18 +0000, Luke A. Guest <laguest@archeia.com>
declaimed the following:

><gautier_niouzes@hotmail.com> wrote:
>>> That's really interesting, and slightly funny, and slightly sad.
>> 
>> I find a good thing that Microsoft, accidentally or not, considers Ada as
>> a main language development goal.
>> 
>
>What? Where's this from? A goal for what?

	Yeah... Call me when VS-Ada Express is available for download <G>
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
0
Dennis
12/16/2016 1:04:19 PM
Le vendredi 16 d=C3=A9cembre 2016 13:43:26 UTC+1, Alejandro R. Mosteo a =C3=
=A9crit=C2=A0:
> On 16/12/16 08:55, Hadrien Grasland wrote:
> > Le jeudi 15 d=C3=A9cembre 2016 13:49:20 UTC+1, Alejandro R. Mosteo a =
=C3=A9crit :
> >> And tasking? Every time I see C++ people fumbling with low-level
> >> semaphores I want to cry. No language (that I know) comes even near Ad=
a
> >> tasks + protected combo. No wonder multithreading is sold as some kind
> >> of miracle when some program uses it properly.
> >
> > To be fair, Ada has no equivalent to C++'s portable atomics either. C++=
 these days is mostly marketed as a low-level infrastructure to build perfo=
rmance-critical libraries in, whereas Ada is more designed like a high-leve=
l end-user solution, and these diverging design goals lead to different des=
ign choices.
>=20
> Yep, C++ is adding tons of useful thing to the standard libs after the=20
> 11/14 iterations. Actually, with the newest versions you can get rid of=
=20
> many bad practices, I'd say it's even very confy to write in. The heavy=
=20
> templating and crypotsyntax however still scare me the moment I have to=
=20
> check library code.

It is quite frustrating, though, how much the C++ commitee favors super-gur=
u features catering to the last 5% performance optimization, such as conste=
xprs, over basic usability improvements like concepts (C++ finally coming c=
lose to understanding Ada 83 generics), modules (C++ compilation finally en=
tering the 21st century), the concurrency TS (finally admitting that C++11 =
futures were a total clusterfsck), ranges (finally freeing people from the =
repetitive and unreadable mess of iterator-based code)...
0
Hadrien
12/16/2016 8:14:02 PM
"Luke A. Guest" <laguest@archeia.com> wrote in message 
news:1746994446.503570059.968027.laguest-archeia.com@nntp.aioe.org...
> Randy Brukardt <randy@rrsoftware.com> wrote:
>> "Wesley Pan" <wesley.y.pan@gmail.com> wrote in message
>> news:276a2153-b81f-4e19-9615-530e798e5798@googlegroups.com...
>>> I have no doubt that Ada's exposure to the masses would have been
>>> greatly helped if people could make iOS apps with Ada when iPhones
>>> first became popular.
>>
>> Given that Apple wouldn't allow apps in the iTunes store unless they are
>> written in one of their "approved" languages and implementations, the 
>> odds
>
> No longer the case. Any language is allowed now.

Sure. But the OP said "when iPhones first became popular". Wasn't possible 
then.

                                 Randy.

> 


0
Randy
12/16/2016 8:19:51 PM
On 16/12/16 21:14, Hadrien Grasland wrote:
> Le vendredi 16 décembre 2016 13:43:26 UTC+1, Alejandro R. Mosteo a écrit :
>> On 16/12/16 08:55, Hadrien Grasland wrote:
>>> Le jeudi 15 décembre 2016 13:49:20 UTC+1, Alejandro R. Mosteo a écrit :
>>>> And tasking? Every time I see C++ people fumbling with low-level
>>>> semaphores I want to cry. No language (that I know) comes even near Ada
>>>> tasks + protected combo. No wonder multithreading is sold as some kind
>>>> of miracle when some program uses it properly.
>>>
>>> To be fair, Ada has no equivalent to C++'s portable atomics either. C++ these days is mostly marketed as a low-level infrastructure to build performance-critical libraries in, whereas Ada is more designed like a high-level end-user solution, and these diverging design goals lead to different design choices.
>>
>> Yep, C++ is adding tons of useful thing to the standard libs after the
>> 11/14 iterations. Actually, with the newest versions you can get rid of
>> many bad practices, I'd say it's even very confy to write in. The heavy
>> templating and crypotsyntax however still scare me the moment I have to
>> check library code.
>
> It is quite frustrating, though, how much the C++ commitee favors super-guru features catering to the last 5% performance optimization, such as constexprs, over basic usability improvements like concepts (C++ finally coming close to understanding Ada 83 generics), modules (C++ compilation finally entering the 21st century), the concurrency TS (finally admitting that C++11 futures were a total clusterfsck), ranges (finally freeing people from the repetitive and unreadable mess of iterator-based code)...

Totally agreed.


0
Alejandro
12/17/2016 12:01:57 AM
Luke A. Guest <laguest@archeia.com> writes:
> Yup. Need to get younger people excited but seems only a few of us
> actually see this.

Younger programmers (those who didn't grow up dealing with old slow
machines with little memory) generally use lower performance but more
convenient languages rather than C, Ada, etc.  They're protected from
integer overflow by bignums, memory errors by bounds checking,
alloc/free errors by garbage collection, etc.  Lots of very good
developers shipping successful products have never programmed in
anything but Javascript or Python or Ruby.  Ada and C are niche
languages for embedded control and C++ is for when performance requires
it (except now Go and Rust are cutting in on that niche too).

As others have said, C++ has also improved a lot lately, with more
improvements coming.
0
Paul
12/17/2016 10:09:47 AM
Le samedi 17 d=C3=A9cembre 2016 11:09:49 UTC+1, Paul Rubin a =C3=A9crit=C2=
=A0:
> Luke A. Guest writes:
> > Yup. Need to get younger people excited but seems only a few of us
> > actually see this.
>=20
> Younger programmers (those who didn't grow up dealing with old slow
> machines with little memory) generally use lower performance but more
> convenient languages rather than C, Ada, etc.  They're protected from
> integer overflow by bignums, memory errors by bounds checking,
> alloc/free errors by garbage collection, etc.  Lots of very good
> developers shipping successful products have never programmed in
> anything but Javascript or Python or Ruby.  Ada and C are niche
> languages for embedded control and C++ is for when performance requires
> it (except now Go and Rust are cutting in on that niche too).
>=20
> As others have said, C++ has also improved a lot lately, with more
> improvements coming.

I wouldn't put Go in the high-performance niche for the same reason that I =
don't consider Java as a competitor to C++. Although the CPU performance of=
 these languages has improved so much over the years that it is rarely a bl=
ocker anymore, the memory consumption of their implementations is still way=
 too high for applications that push the hardware to its limits.

This is especially true as hardware parallelism starts to grow faster than =
RAM size, leading to a fast decrease of memory per compute core. While big =
Java applications are usually designed for 4-8 GB of RAM per CPU core, Inte=
l's Xeon Phi has 1.4 GB of "slow" DDR4 and ~50 MB of "fast" MCDRAM per hype=
rthread, and the typical GPU scratchpad is ~48 KB large and shared by hundr=
eds of threads...

Rust's memory management model is more interesting, and seems less wasteful=
 than Java's garbage collector. It might be better suited to the highly par=
allel architectures that are becoming the norms for high-performance comput=
e. But will it be good enough to displace C, C++ and Fortran? Only time wil=
l tell...
0
Hadrien
12/17/2016 10:51:41 AM
Le samedi 17 d=C3=A9cembre 2016 11:09:49 UTC+1, Paul Rubin a =C3=A9crit=C2=
=A0:
> Luke A. Guest writes:
> > Yup. Need to get younger people excited but seems only a few of us
> > actually see this.
>=20
> Younger programmers (those who didn't grow up dealing with old slow
> machines with little memory) generally use lower performance but more
> convenient languages rather than C, Ada, etc.  They're protected from
> integer overflow by bignums, memory errors by bounds checking,
> alloc/free errors by garbage collection, etc.  Lots of very good
> developers shipping successful products have never programmed in
> anything but Javascript or Python or Ruby.

When I try to "sell" Ada to people used other languages, the main benefit t=
hat I usually invoke is that in Ada, you can leave much more of the debuggi=
ng work to your toolchain. That the language, by design, makes it harder to=
 write erronerous code, and easier for a computer program to detect it, Tha=
t argument is usually well received, as no one likes manual debugging, whic=
h is why there is a clear trend towards more automated static and dynamic a=
nalysis tools these days.

Javascript, Python and Ruby developers go through a lot of debugging pain b=
ecause the interface of libraries written in this program is severely under=
specified. For example, there is nothing in the actual code telling you or =
the compiler/interpreter that a function is designed to take strings as inp=
ut, and will blow up somewhere deep in the implementation if passed an inte=
ger. The developer writing the function has no way to know what we will get=
 as input, and the one calling the function has no way to know what it expe=
cts as output. It is all based on fragile conventions between developers, t=
hat are at best documented through code comments or external documentation,=
 which will become out of date on the first refactoring. Every attempt in p=
rogramming language history to handle type mismatches automatically without=
 developer help, as in PHP and Javascript, has been an unmitigated disaster=
..

C++ templates have exactly the same problem, for exactly the same reason: t=
he interface to them is implicit, not explicit, and most importantly the co=
rresponding interface requirements are implementation-defined. No C++ compi=
ler is able to produce a good template debugging error message simply becau=
se the required information to do so wasn't written in the code by the deve=
loper. The only point where a C++ compiler knows that template instantiatio=
n fails is where the implementation conflicts with the type parameter that =
was passed to the interface.

Everyone has a dream that one day, someone will devise a programming langua=
ge that enforces the use of explicit, well-specified interface, that can be=
 easily checked by compilers and analyzers in order to detect and report to=
ns of developer errors automatically. It just so happens that today, Ada is=
 the closest aproximation of this dream in existence.
0
Hadrien
12/17/2016 11:36:39 AM
On 12/17/2016 4:09 AM, Paul Rubin wrote:

>
> Younger programmers (those who didn't grow up dealing with old slow
> machines with little memory) generally use lower performance but more
> convenient languages rather than C, Ada, etc.  They're protected from
> integer overflow by bignums, memory errors by bounds checking,
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> alloc/free errors by garbage collection, etc.


Which one of these so called "modern" and "fun" languages
that Younger programmers use has bounds checking built in?

Can one even declare a variable in these languages with restricted
bounds?  May be I am misunderstanding the context you are thinking
of here.

I thought Ada was unique in this area, one of the few language
if not only one.

>Lots of very good
> developers shipping successful products have never programmed in
> anything but Javascript or Python or Ruby.  Ada and C are niche
> languages for embedded control and C++ is for when performance requires
> it (except now Go and Rust are cutting in on that niche too).
>
> As others have said, C++ has also improved a lot lately, with more
> improvements coming.
>

I would not touch c++ not matter how good it becomes. Such a
complex language. Computer languages should be simple
to understand. Ada also has got too complex from its
original1983 version.

We all should go back to using Turbo Pascal. That was a simple,
an easy to understand and a fun language to program in :)

--Nasser
0
Nasser
12/17/2016 5:13:24 PM
On 2016-12-17 18:13, Nasser M. Abbasi wrote:

> We all should go back to using Turbo Pascal. That was a simple,
> an easy to understand and a fun language to program in :)


I kind of did this summer. Not rally TP but free pascal,
and lazarus, in order to connect to an xbox kinect,
and get some distance info from it - in order to control a drone.
The interface and sample was in pascal (and c/c++/.net/python)

(I the end I had no luck with controlling the drone)

But I was very disappointed on the Pascal language.
I started to learn Pascal in the early 90'ies,
and memory tends to forget about the bad parts, glorifing the good.

I missed a couple of Ada constructs right away
* I don't like one-line if statements
* I don't like one-line for loop statements
* I don't like fixing it with begin/end
* I don't like having just 'end' instead of 'end if'/'end loop' etc
* I don't like pragmas to change short-circuit if a and b behavior

and a lot of other things.
I did like the Lazarus environment though.


--
Björn
0
UTF
12/17/2016 5:52:34 PM
On Sat, 17 Dec 2016 11:13:24 -0600, "Nasser M. Abbasi" <nma@12000.org>
declaimed the following:

>On 12/17/2016 4:09 AM, Paul Rubin wrote:
>
>>
>> Younger programmers (those who didn't grow up dealing with old slow
>> machines with little memory) generally use lower performance but more
>> convenient languages rather than C, Ada, etc.  They're protected from
>> integer overflow by bignums, memory errors by bounds checking,
>                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> alloc/free errors by garbage collection, etc.
>
>
>Which one of these so called "modern" and "fun" languages
>that Younger programmers use has bounds checking built in?
>

	I suspect they mean in terms of the infamous buffer overrun error of C

	These (unnamed) language will object if you try to index a structure
past its end.

-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
0
Dennis
12/17/2016 8:45:20 PM
"Nasser M. Abbasi" <nma@12000.org> writes:

> On 12/17/2016 4:09 AM, Paul Rubin wrote:
>
>> Younger programmers (those who didn't grow up dealing with old slow
>> machines with little memory) generally use lower performance but more
>> convenient languages rather than C, Ada, etc.  They're protected from
>> integer overflow by bignums, memory errors by bounds checking,
>                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> alloc/free errors by garbage collection, etc.
>
> Which one of these so called "modern" and "fun" languages
> that Younger programmers use has bounds checking built in?

"bounds checking" means "array bounds checking".
Almost all languages have that (C being a notable exception).

I think you're thinking of "range checking", as in Ada where
you declare something to be "range 1..Integer'Last", and
it checks that you didn't assign 0 or -123 to it.
Fewer languages have that.

> Can one even declare a variable in these languages with restricted
> bounds?  May be I am misunderstanding the context you are thinking
> of here.
>
> I thought Ada was unique in this area, one of the few language
> if not only one.

Not unique.  Ada got the idea from Pascal.  And Modula-N and
other Wirthian languages have it.

> ...Ada also has got too complex from its
> original1983 version.

It was already too complex in 1983.

> --Nasser

- Bob
0
Robert
12/17/2016 9:56:37 PM
On 2016-12-17, Robert A Duff <bobduff@TheWorld.com> wrote:
> "Nasser M. Abbasi" <nma@12000.org> writes:
>
>> On 12/17/2016 4:09 AM, Paul Rubin wrote:
>>
>>> Younger programmers (those who didn't grow up dealing with old slow
>>> machines with little memory) generally use lower performance but more
>>> convenient languages rather than C, Ada, etc.  They're protected from
>>> integer overflow by bignums, memory errors by bounds checking,
>>                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>> alloc/free errors by garbage collection, etc.
>>
>> Which one of these so called "modern" and "fun" languages
>> that Younger programmers use has bounds checking built in?
>
> "bounds checking" means "array bounds checking".
> Almost all languages have that (C being a notable exception).
>

And also C++ where you don't get it unless you go out of your
way to use an unexpected (but safe) method as the usual "[]" is
not bounds checked in at least the parts of the C++ standard
library which I have used.

Simon.

-- 
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world
0
Simon
12/17/2016 10:56:27 PM
Reply: