Want more...Sugar
As I am talking with developers about programming language features and extensions, I immediately as the person to describe what programming problem they are trying to solve. If language syntax can help, then I am all for adding the capability. Consider the interface syntax, for example, that was added to Embarcadero Delphi way back in version 3.0. Of course, it is cool to add interfaces to an object or non-object oriented language. An interface specifies a pre-defined agreement between an object and other objects, services, and systems will eventually implement the interface.
Adding Delphi interfaces solved some real programming challenges of COM programming and simplified what a developer had to program by hand (note: Microsoft introduced their Com+ programming simplification years later). Interfaces allow you to define objects in an implementation independent way. Interfaces were also useful later for web services programming where the implementation is detailed in the web service on some computer. While the early Delphi interfaces were directly tied to COM (IUnknown), you can also create pure interfaces.
Other developers have asked us to support multiple inheritance, like in C++. With interfaces, Delphi also supports multiple interface inheritance. I believe this is a much better capability without some of the difficulties of multiple inheritance. The Java language also supports interfaces.
Operator overloading was also labeled sugar coating by some developers. But, seeing operator overloading in other languages and their use to create more reusable objects and extend the reach of operators to class methods, iterators, generics, and more. The C++ programming language contains a wide array of enhancements above and beyond the C programming language. While some developers will point to C++ syntactic sugar elements, I agree with the ISO C++ committee and BJarne Stroustrup, that every addition to the C++ language continues to make the language better for building libraries, system programming, make the language easier to teach and learn, and continue to make programming safer, more powerful and flexible. We are happy and proud to continue to enhance C++Builder to support the evolution of C++.
If you like your programming sweetener to be syntax, libraries, frameworks, application platforms, sugar, honey, sucrose, dextrose, lactose, fructose, aspartame, sucralose, splenda, or saccharin, I am for it. I will gladly add sugar to my programming ingredients. What programming language syntax would you classify as sugar? What programming language extensions would you like to see in future versions of the Delphi compiler?
For now, you'll have to wait a short while longer for some of Embarcadero's new sugar. Stay tuned to the Embarcadero web site for the next generation in business application development.


Comments
-
Heinz Z. Monday, 18 July 2011
I want ... more speed in developing syntactic sugar for Delphi. At the moment Prism make the pace. All is welcome which helps to show more clearly what the programmer is trying to achieve.
A "case" for strings is simple example: Everybody knows how to implement that with an "if-then-else" chain. But for an "if-then-else" chain I have to check every condition before I can be sure its a real "string-case" replacement. On the other side I can get the same information from one single line. So I miss a "string-case". :-)
An other example is interfaces with a protected area. At the moment I can't hide the setters and getters of interface properties. When I uses properties the numbers of identifiers explode by factor 3. With properties the user of an interface always has 2 ways to set or get a property value. But that is not what the programmer try to accomplish. So I miss a protected area for interfaces. :-) -
Kashif Monday, 18 July 2011
I do hope linq is in your todo list.
It would be cool if we can add an image of a class instead of a box, to the class diagram. This will immediately convey the meaning to the observer. A customer class has a customer image/icon, similarly a product has a product image/icon.
How about a next gen datamodule. which shows connection lines between components.
Just from the top of my head.
Move more and more towards automatic code generation for the entire application (especially multi-tier).
This should increase productivity tremendously. -
David I Tuesday, 19 July 2011
Kashif - check out TChromium - component to interface to Chrome runtime. You can use it to build HTML applications for Win32.
http://code.google.com/p/delphichromiumembedded/
http://magpcss.org/ceforum/viewtopic.php?f=11&t=123 -
Ken Knopfli Tuesday, 19 July 2011
The WITH statement has long been derided as "syntactic sugar".
Properly implemented, it is a truly useful tool, meaning less typing and helping readability (as currently implemented, the opposite is the case)
People have posted several realistic suggestions for many years in the QA.
I understand there are implications for the debugger, but it is worth it.
In Borland Pascal 7, we at least had the error message that the value cannot be displayed. Now we get the value of the same name in the "root". Totally misleading. -
Please login first in order for you to submit comments
- Page :
- 1
I would like to see something like goroutines and channels to ease concurrency. Syntactic sugar for memory management a la IOS5 (no more manual retain/release calls required) would be quite nice too.