Re: Commensurability as Key

2013-08-23 Thread Steve Pitchford
I think James Bowery's comments are intended to address a real need for programming languages to work with units of measurement. It might even prevent aircraft accidents which have really happened because fuel was delivered in Canadian gallons, or kilograms, when the pilots request was for

Fwd: Commensurability as Key

2013-08-23 Thread Steve Pitchford
I'll start with your last point: At this point, though, plans to expand on Perl 6's capabilities are taking a back seat to getting Perl 6's existing capabilities implemented. This has been true for some time now, in fact — which is all the more reason to get Perl 6.0 fully implemented as soon as

Re: Commensurability as Key

2013-08-23 Thread Paweł Murias
One thing to keep in mind is that while adding such things to the Perl 6 core might not be the highest priority at this point something like that could be implemented as a module (if we have a consistent idea what we want). Currently it's possible to change the language to (a subset of) Perl 5 (

Re: Commensurability as Key

2013-08-23 Thread Steve Pitchford
I have to admit to currently being of the opinion that Commensurability appears to be a feature for program code to perform rather than a programming language to perform, but openly admit to the possibility that I do not understand the concept fully enough for my opinion to be valid. Your point

Re: Commensurability as Key

2013-08-23 Thread Jonathan Lang
On Aug 23, 2013, at 2:41 AM, Steve Pitchford steve.pitchf...@gmail.com wrote: How would you implement, in a robust way, the following things: 1 kg + 1 kg = 2 kg 2 m * 3 m = 6 m^2 5 kg * (3 m/s)^2 = 45 J The answer is that you wouldn't - the problem domain is so vague as to be

Re: Commensurability as Key

2013-08-23 Thread Steve Pitchford
If I understand you correctly, what you are suggesting is the syntactic sugar similar to perl 5's overload, but with Object/Class support, support for autoboxing and a way, either by convention or configuration of facilitating type conversion and degradation? So one could write something like:

Julia: was Re: Commensurability as Key

2013-08-23 Thread Todd C. Olson
It is interesting to look at what Julia has done to get numerical performance from a dynamic language http://julialang.org/ and julia's visibility in to the internal representation http://blog.leahhanson.us/julia-introspects.html Regards, Todd Olson