[M3devel] saving indentation?

Jay K jay.krell at cornell.edu
Sun Sep 2 21:34:28 CEST 2012


WeakRef isn't great. Cleanup is delayed until local memory pressure exists. Not when resource obviously goes out of scope and could be cleaned up right away.

 - Jay


Subject: Re: [M3devel] saving indentation?
From: dragisha at m3w.org
Date: Sun, 2 Sep 2012 10:25:34 +0200
CC: m3devel at elegosoft.com
To: jay.krell at cornell.edu

With C++ you don't have "big complicatched machinery" behind the scenes, serving clearly defined language. It's complicatchion is right in front of you.
You have big nasty complicated language in front of a programmer and in front of compiler implementor. For what? For fanciness of infix operator? 
Garbage collection and WeakRef mechanism are bringing destructor-like functionality to any type you wish. To me, it is a lot more important than fancy infix.


--Divided by a common language
Dragiša Durićdragisha at m3w.org



On Sep 2, 2012, at 9:34 AM, Jay K wrote:There is more to my usual C++ pitch.
Some languages have garbage collection. So "pointers" don't need such "fanciness" as reference counting, "smart pointers". But instead there is a big complicatched machinery behind the scenes.
Similarly, some languages have "synchronized" or "lock". Here again, the syntax is approximately perfect and you can't fail to release a lock.


However these are both special purpose mechanisms, for memory and for locks.


What about closing files, network connections, database connections?
C++ does a good job of providing a general purpose mechanism, rather than having the compiler and runtime special-case two specific resources. Operator overloading fits here too. C, Java, Modula-3 special case a few types -- int, float, string, and provide some infix operators. No user-defined type is given this power. In C++, user-defined types and language-defined types have approximately equal powers.

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20120902/db5fc1cb/attachment-0002.html>


More information about the M3devel mailing list