I think, since newLisp is not a "normal" lisp, I have some requests to drammatically improve the tools available (in terms of developer flexibility).
Introduce some other native data types, like...
==> DATE / TIME:
In this way I could manage dates as a native type. For example I could make: (+ 12-jan-2009 5) -> date + some days, without converting in strings. It could even manage some "standard" date/time formats, like: 12-jan-2009, 12-jan-09, 12-01-09, etc... Same concept for time.
===> HTTP and EMAIL:
Instead working with http using strings, I could directly manage like a native datatype. This could even get more control over wrong syntax. For example:
http://www.google.it (without apex like string).
Introduce some functions to work with those datatypes. For example:
(get-domain http://www.google.it/index.php) --> www.google.it
or...
(get-domain http://www.google.it/index.php 1) --> "it" (first level domain).
Same concept for email, ftp, udp.
===> 2D or 3D or n-D points (vectors):
I could manage points like coordinates:
(+ 12.13 2) ==>14.15 <vector> 11.16
Same thing for 3D or even 4D: 1.2.3 or 1.2.3.4
===> BINARY FORMAT and other native formats like IMAGE, SOUND, etc...
===> "TAG" datatype, useful for HTML and XML:
<a>
Generally speaking, I think that introducting some other native datatypes could give us some improvements:
1) Better check (for errors) from newLisp engine.
2) Faster usage and faster execution (native datatypes are usually managed better than "artificial" ones, since there could be no reason to make conversion. For example, images to work with date and times: one must always convert date to string and back.
For example:
Code: Select all
(dotimes (x 30)
(+ 1-jan-2009 x)
)
>> 1-jan-2009
2-jan-2009
3-jan-2009
...
4) I really don't like (generally speaking, and not related to newLisp only) always work with strings since programming languages do not manage other datatypes than numbers and strings. I think a scripting language should supply some more powerful datatypes.
My 2 cents opinion.
What do you think about it?