Few mixed things
bearophile
bearophileHUGS at lycos.com
Tue Apr 21 08:09:40 PDT 2009
Few things I have collected in the last days.
Can RAND_MAX be added to std.c.stdlib of D1 too?
-----------------------
What is the advantage of having a separate /+ +/ nestable comment syntax?
Can't the /+ +/ be removed to make the normal /* */ syntax nestable?
(IS the different C semantics of /* */ a problem here? I don't think so.)
-----------------------
Using obj2asm to the .obj produced by D2 (v2.029) produced huge (like 100-600 KB!) asm files even for 10-lines long programs (The same asm files where very small for D1). There's a very large amount of asm code inside there.
-----------------------
>From the Python newsgroup:
>Linden Lab, makers of Second LIfe virtual world, found it was good to create a C++ class similar to a Python dictionary in order to leverage some of the faster prototyping advantages of that Python type when converting to C++.<
>LLSD is a proposed IETF standard so there's no licensing issues involved in using the technique, and I believe there are implementations in C++ (GPL) and C#(BSD) and possible other languages as well.<
>Linden Lab Structured Data (LLSD) is an abstract type system intended to provide a language-neutral facility for the representation of structured data. It provides a type system, a serialization system and an interface description language.<
http://wiki.secondlife.com/wiki/LLSD
http://tools.ietf.org/id/draft-hamrick-llsd-00.txt
-----------------------
The std.intrinsic module may gain a standard way to perform a 64-bit by 32-bit division, for the situations where you know the quotient will fit in 32 bits ('divl' instruction on X86).
CPUs that don't support such operation can use the normal 64-big division.
-----------------------
I don't like the way Ruby denotes intervals open/closed on the right.
The following is how you do it in the Groovy language (but I don't like it, because I like intervals by default open on the right):
Loop on closed on the right range:
for (i in 0..n)
Loop on open on the right range:
for (i in 0..<n)
Two possible syntaxes for D, to represent intervals closed on the right, using ..# or ..>
for (i; 0 ..# n)
for (i; 0 ..> n)
I like the syntax with # better.
But probably adding a +1 at the end is good enough too for D. Better keep things simpler.
Later,
bearophile
More information about the Digitalmars-d
mailing list