File size

File size

File size

File size

File size

969.6 MB

While attending GOTO Aarhus 2012, the great Gilad Bracha stopped by the venue (he wasn't attending or speaking at the conference. He was in Aarhus to do work with the core DART engineering team, who are based there). Erik Meijer was a track owner for the event, so he was wandering around the halls in his trademark tie dyes...

Gilad and Erik. Same place. Same time. A coincidence that demanded an Expert to Expert session. They kindly agreed to be put into the spotlight (literally) for a C9 conversation. Here's what happened...

Giladism #42: "Mathematicians love to explain things backwards."Giladism #43: "There is a huge role for mathematical abstractions in programming languages. It's just that you have to know when to shut up about them and stop taking them as religion."

Some highlights:

[00:00] State of programming language design today[05:01] On actors[08:28] Dart snapshot facility[34:07] On monads[42:26] On continuations and when to hide mathematical complexity from users

I don't agree with Gilda's claim that type based overloading is a useless feature.

I may be confused or there may be another way to get at this but given that you want to apply one logical operation to several different unrelated types (like save or load) then it appears that type based overloading is the only way to reduce needless duplication such as:saveInt( int)saveFloat( float)

replaced with:save(int)save(float)

Less duplication and the compiler automatically finds the right answer.

Furthermore, with c++ traits based programming you can fairly explicitly tell the compile to apply an specific operation given a specific type, which seems like a generalization of type-based function overloading.

How does a programmer in a typed language deal with the above situation without littering repetition all over their codebase?

The form save(int) is not object oriented.Instead use:- intObject.save()- floatObject.save()

An OO method should be:- specific regarding its object (argument).Gilad avoids even such specifity in its Newspeak language by having only message passing even within an object; as far as I remember.- generic or abstract regarding the (other) arguments.The method parameter types indicate the requirements of the method regarding the corresponding arguments.

Define types lazily based on what you need and not eagerly based on what you think you have or your what your object is.I guess this is the point of the Google Go language typesystem as well; but I might be mistaken here too.

@LiyangType classes are the answer after checking out the wikipedia page. C++ traits structs are a more ad-hoc form of type classes, Thanks!

@gggYou are off the mark. I stated arbitrary types and you can't add every conceivable operation to every class. You need a way to extend types with arbitrary operations after the types have been created as a third party (not the creator of the types).

Mathematics is a programming language for human brain.The main advantage of mathematics is flexibility.

In mathematics it is possible to express all kinds of ideas in a very compact and flexible way. Existing programming languages have to comply with all kind of standards which significantly limit their flexibility and possible use in a human reasoning process.Mathematics is a "programming language" specially tuned for the use by humans.In mathematics we are constrained only by our imagination.Because of that mathematics is going to be the leading language for expressing human ideas in the future even in the world of programming languages.It is hard to describe new abstract concepts in for example "c".However, I believe that in a long run (many, many years) the future belongs to some kind of artificial reasoning techniques which will be based on some kind of future AI concepts.

Firstly, a very entertaining and engaging discussion. Nice work Charles!

Secondly, as someone who has done a fair bit of Smalltalk, C#, Java and F#, I and can contribute from my experience.

Smalltalk certainly has the cleanest syntax that I have seen. It is a pleasure to work in that language (unfortunately it was all but wiped out by Java). It think it is the most stress free language that I can think of.

Now I work mostly work in F# and I believe that I am better off than when I was working in either Smalltalk (or C# or Java).

F# (or OCaml) has strong *type inference* so most of the time it does not *feel* that you are working in a strongly typed language. If you make a change, the types automatically propagate through. If there is a type conflict, the error gets flagged and you can fix it.

While nothing is perfect, F# strikes a good balance between the extremes of Smalltalk and Haskell.

Remove this comment

Remove this thread

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums, or
Contact Us and let us know.