On Monday, 23 June 2014 at 22:08:59 UTC, John Carter wrote:
On Monday, 23 June 2014 at 21:26:19 UTC, Chris Williams wrote:
More likely what you want are variants:
Hmm. Interesting.
Yes, Variant and VariantArray are much closer to the dynamic
language semantics...
But the interesting
I guess between perl and Ruby and Scheme etc. I got used to
creating hybrid containers
Want a pair of [string, fileList]? Just make an Array with two
items, one a string, one and array of strings. Done.
D barfed... leaving me momentarily stunned... then Oh Yes, type
safety, Tuple's are
On Monday, 23 June 2014 at 21:18:39 UTC, John Carter wrote:
I guess between perl and Ruby and Scheme etc. I got used to
creating hybrid containers
Want a pair of [string, fileList]? Just make an Array with two
items, one a string, one and array of strings. Done.
D barfed... leaving me
On 6/23/14, 6:18 PM, John Carter wrote:
I guess between perl and Ruby and Scheme etc. I got used to creating
hybrid containers
Want a pair of [string, fileList]? Just make an Array with two items,
one a string, one and array of strings. Done.
D barfed... leaving me momentarily stunned...
Ary Borenszweig:
As a library solution I would do something like this:
Union!(int, string)[] elements;
elements ~= 1;
elements ~= hello;
Take a look at Algebraic in Phobos.
Bye,
bearophile
On Monday, 23 June 2014 at 21:26:19 UTC, Chris Williams wrote:
More likely what you want are variants:
Hmm. Interesting.
Yes, Variant and VariantArray are much closer to the dynamic
language semantics...
But the interesting thing is Tuple is much closer to What I
Mean when I create
On Monday, 23 June 2014 at 22:11:57 UTC, John Carter wrote:
On Monday, 23 June 2014 at 21:49:29 UTC, Ary Borenszweig wrote:
Union types are very common (I use them every day), and IMHO
it's very nice to have them included in the language (either
built-in or as a library solution). As a
On Thursday, 15 March 2012 at 22:51:57 UTC, H. S. Teoh wrote:
It can also be a security concern. Somebody could offer players
an
awesome script in DLL form that actually contains arbitrary
exploit
code. Or a script that contains D code for an exploit.
If you are compiling at runtime you can
On Thursday, 15 March 2012 at 22:37:12 UTC, Manu wrote:
Do you expect users to be modifying the scripts in the retail
release?
Surely scripting is still for what it has always been for, rapid
iteration/prototyping during development.
You need to be able to do both.
You only need the
That is the reason why managed environments with JIT are so popular,
you get the best of both worlds.
Andrei Alexandrescu wrote in message
news:jjtiu8$1ucs$1...@digitalmars.com...
On 3/15/12 3:12 PM, Nick Sabalausky wrote:
Anything an interpreter can do, a compiler can do. And dynamic
To be fair Python is not alone, all the ML languages (Ocaml, Haskell, F#,
...) also work that way.
F# was even funnier. While the language was experimental the default mode
was still like most
languages, and a #light mode was available, similar to what ML-like
languages have.
Due to the
Adam D. Ruppe wrote:
import std.variant;
struct Extendable {
Variant[string] properties;
Variant opDispatch(string name)() {
return properties[name];
}
Variant opDispatch(string name, T)(T t) {
properties[name] = t;
return properties[name];
}
}
void
On Friday, 16 March 2012 at 07:48:19 UTC, so wrote:
On Thursday, 15 March 2012 at 22:37:12 UTC, Manu wrote:
Do you expect users to be modifying the scripts in the retail
release?
Surely scripting is still for what it has always been for,
rapid
iteration/prototyping during development.
You
On Friday, 16 March 2012 at 09:12:57 UTC, F i L wrote:
Alright I give up dammit! How do you use opCall() to make
a.cool() work?
How would it be possible, the type of the delegate can't be
typechecked at the call-site, because the type info is lost in
the variant. And you can't exhaustively
On Friday, 16 March 2012 at 09:12:57 UTC, F i L wrote:
Alright I give up dammit! How do you use opCall() to make
a.cool() work?
I was a little unclear... but you'll have to modify
std.variant and/or wrap it.
Here's a solution that wraps it:
==
import std.traits;
import std.variant;
// we
On 16/03/2012 02:28, Nick Sabalausky wrote:
James Millerja...@aatch.net wrote in message
news:mailman.733.1331853568.4860.digitalmar...@puremagic.com...
I hate the fact that Flash games are created the way they are. For
one, it's impenetrable to try and learn properly, I had so much
trouble
Simon s.d.hamm...@gmail.com wrote in message
news:jk053b$sg0$1...@digitalmars.com...
On 16/03/2012 02:28, Nick Sabalausky wrote:
James Millerja...@aatch.net wrote in message
news:mailman.733.1331853568.4860.digitalmar...@puremagic.com...
I hate the fact that Flash games are created the way
On Friday, 16 March 2012 at 14:23:20 UTC, Adam D. Ruppe wrote:
On Friday, 16 March 2012 at 09:12:57 UTC, F i L wrote:
Alright I give up dammit! How do you use opCall() to make
a.cool() work?
I was a little unclear... but you'll have to modify
std.variant and/or wrap it.
Here's a solution
On Friday, 16 March 2012 at 22:48:44 UTC, F i L wrote:
Yes it does. I'm sure it wont be too long before all this stuff
is fixed up a bit.
Aye. I just sent a pull request for the minor std.variant
thing (so strings can be converted to ints - we can do
weak typing more easily now if we want).
On Friday, 16 March 2012 at 11:22:07 UTC, Boscop wrote:
How would it be possible, the type of the delegate can't be
typechecked at the call-site, because the type info is lost in
the variant.
The trick is to build wrapper functions at the assignment
point, where you still have all the type
so:
Not related to D but this is a community which i can find at
least a few objective person. I want to invest some quality
time on a dynamic language but i am not sure which one. Would you
please suggest one?
To give you an idea what i am after:
Of all one-liners i have heard only
I mostly do game scripting -- and there are quite a few features in D that
I would like access to.
Python would be my goto dynamic language mostly because a lot of the
applications I use are either partially written in it or can be scripted
easily using it. Also it is quite an enjoyable language
Hello,
Not related to D but this is a community which i can find at
least a few objective person. I want to invest some quality
time on a dynamic language but i am not sure which one. Would you
please suggest one?
To give you an idea what i am after:
Of all one-liners i have heard only one
On Thursday, 15 March 2012 at 07:09:39 UTC, so wrote:
Hello,
Not related to D but this is a community which i can find at
least a few objective person. I want to invest some quality
time on a dynamic language but i am not sure which one. Would
you please suggest one?
To give you an idea
cases.
--
Paulo
so wrote in message news:uamqdkmnshxmvayeu...@forum.dlang.org...
Hello,
Not related to D but this is a community which i can find at
least a few objective person. I want to invest some quality
time on a dynamic language but i am not sure which one. Would you
please suggest one
but this is a community which i can find at least a few
objective person. I want to invest some quality time on a dynamic
language but i am not sure which one. Would you please suggest one?
To give you an idea what i am after:
Of all one-liners i have heard only one gets me.
The programmable programming
On 03/15/2012 12:09 AM, so wrote:
Hello,
Not related to D but this is a community which i can find at least a few
objective person. I want to invest some quality time on a dynamic
language but i am not sure which one. Would you please suggest one?
To give you an idea what i am after:
Of all
On 2012-03-15 08:09, so wrote:
Hello,
Not related to D but this is a community which i can find at least a few
objective person. I want to invest some quality time on a dynamic
language but i am not sure which one. Would you please suggest one?
To give you an idea what i am after:
Of all one
http://rigaux.org/language-study/scripting-language/
On 3/15/12 4:09 AM, so wrote:
Hello,
Not related to D but this is a community which i can find at least a few
objective person. I want to invest some quality time on a dynamic
language but i am not sure which one. Would you please suggest one?
To give you an idea what i am after:
Of all one
On Thursday, 15 March 2012 at 07:09:39 UTC, so wrote:
Hello,
Not related to D but this is a community which i can find at
least a few objective person. I want to invest some quality
time on a dynamic language but i am not sure which one. Would
you please suggest one?
To give you an idea
On Thu, Mar 15, 2012 at 03:27:32PM +0100, Jesse Phillips wrote:
On Thursday, 15 March 2012 at 07:09:39 UTC, so wrote:
Hello,
Not related to D but this is a community which i can find at least
a few objective person. I want to invest some quality time on a
dynamic language but i am not sure
On 3/15/12 3:58 AM, F i L wrote:
Not really a help to you, but I honestly have no idea why people *want*
to use dynamic programming languages. There is very little benefit I see
in having your core object structure be complete dynamic. I remember
watching this Google tech talk awhile ago, about
On Thursday, 15 March 2012 at 07:09:39 UTC, so wrote:
I want to invest some quality time on a dynamic language but
i am not sure which one. Would you please suggest one?
D!
I'm not kidding... let's look at a list of things
you might want:
* You mentioned lisp. One of the cooler things
On Thursday, 15 March 2012 at 07:09:39 UTC, so wrote:
If so Lisp will be my first choice.
I just talked about D because D rox, but if you are doing
it for education, Lisp is a good choice because it is fairly
unique.
For real jobs, I'd go with D or maybe Javascript if I wanted
scripting.
Thank you all!
On Thursday, 15 March 2012 at 17:30:49 UTC, Adam D. Ruppe wrote:
On Thursday, 15 March 2012 at 07:09:39 UTC, so wrote:
If so Lisp will be my first choice.
I just talked about D because D rox, but if you are doing
it for education, Lisp is a good choice because it is fairly
On 15 March 2012 20:59, so s...@so.so wrote:
Thank you all!
On Thursday, 15 March 2012 at 17:30:49 UTC, Adam D. Ruppe wrote:
On Thursday, 15 March 2012 at 07:09:39 UTC, so wrote:
If so Lisp will be my first choice.
I just talked about D because D rox, but if you are doing
it for
so s...@so.so wrote in message
news:uamqdkmnshxmvayeu...@forum.dlang.org...
Hello,
Not related to D but this is a community which i can find at least a few
objective person. I want to invest some quality time on a dynamic
language but i am not sure which one. Would you please suggest one
all over the gaming
industry because it's fast and integrates with C very easily. Personally, I
don't like it because it *is* a dynamic langauge. But if you're looking for
a dynamic language, well, then there's that.
Back in the 90's, the game Abuse famously had all its gameplay code written
On Thursday, 15 March 2012 at 19:25:24 UTC, Nick Sabalausky wrote:
so s...@so.so wrote in message
news:uamqdkmnshxmvayeu...@forum.dlang.org...
Hello,
Not related to D but this is a community which i can find at
least a few objective person. I want to invest some quality
time on a dynamic
. But if you're
looking for
a dynamic language, well, then there's that.
Not just because i am looking for, how would you code a
customizable ui (wow ui for example) without an interpreter? You
got no other options AFAIK when it comes to customizable stuff.
On Thu, Mar 15, 2012 at 09:15:34PM +0200, Manu wrote:
On 15 March 2012 20:59, so s...@so.so wrote:
[...]
On Thursday, 15 March 2012 at 17:30:49 UTC, Adam D. Ruppe wrote:
[...]
I just talked about D because D rox, but if you are doing it for
education, Lisp is a good choice because it is
very easily. Personally,
I
don't like it because it *is* a dynamic langauge. But if you're looking
for
a dynamic language, well, then there's that.
Not just because i am looking for, how would you code a customizable ui
(wow ui for example) without an interpreter? You got no other options
H. S. Teoh hst...@quickfur.ath.cx wrote in message
news:mailman.709.1331842273.4860.digitalmar...@puremagic.com...
On Thu, Mar 15, 2012 at 09:15:34PM +0200, Manu wrote:
On 15 March 2012 20:59, so s...@so.so wrote:
[...]
On Thursday, 15 March 2012 at 17:30:49 UTC, Adam D. Ruppe wrote:
[...]
On 3/15/12 3:12 PM, Nick Sabalausky wrote:
Anything an interpreter can do, a compiler can do. And dynamic typing
doesn't have anything to do with interpreted vs compiled anyway.
Generating and running code during runtime is often easier in
interpreted environments.
Andrei
On Thursday, 15 March 2012 at 14:55:20 UTC, H. S. Teoh wrote:
Bash?? Are you serious?!
It is terrible as a programming language, I will give you that.
But in terms of something useful to learn, it has been. But I
would say if it is going to take up more than a screen (terminal
size) then
On Thu, Mar 15, 2012 at 03:24:24PM -0400, Nick Sabalausky wrote:
[...]
- If you can stomach the indent-scoping, Python is very well-regarded
and has a lot of fancy advanced features.
I used to despise Python's indent-scoping too, though since then I've
had some opportunity to use Python for
On Thu, Mar 15, 2012 at 04:13:42PM -0400, Nick Sabalausky wrote:
H. S. Teoh hst...@quickfur.ath.cx wrote in message
news:mailman.709.1331842273.4860.digitalmar...@puremagic.com...
On Thu, Mar 15, 2012 at 09:15:34PM +0200, Manu wrote:
On 15 March 2012 20:59, so s...@so.so wrote:
[...]
On 16 March 2012 09:38, H. S. Teoh hst...@quickfur.ath.cx wrote:
(P.S. From what I heard, Lisp trumps D in metaprogramming abilities, but
I don't know Lisp so I can't comment on that.)
Greenspun's Tenth Law states that any time a programming language adds
a new feature, it moves closer to
On Thu, 15 Mar 2012 03:09:37 -0400, so s...@so.so wrote:
Hello,
Not related to D but this is a community which i can find at least a few
objective person. I want to invest some quality time on a dynamic
language but i am not sure which one. Would you please suggest one?
To give you
Ruby, hands down.
- Strong OO language. I believe it was partially based on smalltalk.
- The Object model is very well done, every thing is a first-class object.
- Meta-programming is easy to do
- has good support in IDEs like eclipse and RubyMine
- the gem library is huge and comprehensive -
On 16 March 2012 04:28, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Relevant insight:
http://existentialtype.wordpress.com/2011/03/19/dynamic-languages-are-static-languages/
Andrei
That was a cool article. The comments are amusing, all the people not
really understanding the
Paulo Pinto wrote:
The main benefit dynamic languages bring to the table is not
requiring to
write types everywhere, duck typing, and the flexibility
metaprogramming
has.
I'll give you the metaprogramming bit, but duck-typing is rarely
a benefit over languages, like D and C#, which support
H. S. Teoh hst...@quickfur.ath.cx wrote in message
news:mailman.713.1331843912.4860.digitalmar...@puremagic.com...
On Thu, Mar 15, 2012 at 04:13:42PM -0400, Nick Sabalausky wrote:
H. S. Teoh hst...@quickfur.ath.cx wrote in message
news:mailman.709.1331842273.4860.digitalmar...@puremagic.com...
On Thu, Mar 15, 2012 at 3:56 PM, F i L witte2...@gmail.com wrote:
Paulo Pinto wrote:
The main benefit dynamic languages bring to the table is not requiring to
write types everywhere, duck typing, and the flexibility metaprogramming
has.
I'll give you the metaprogramming bit, but
On 15 March 2012 22:12, H. S. Teoh hst...@quickfur.ath.cx wrote:
On Thu, Mar 15, 2012 at 09:15:34PM +0200, Manu wrote:
On 15 March 2012 20:59, so s...@so.so wrote:
[...]
On Thursday, 15 March 2012 at 17:30:49 UTC, Adam D. Ruppe wrote:
[...]
I just talked about D because D rox, but if
On 16 March 2012 11:37, Manu turkey...@gmail.com wrote:
Do you expect users to be modifying the scripts in the retail release?
Surely scripting is still for what it has always been for, rapid
iteration/prototyping during development.
Hot-plugging DLL's written in D sounds pretty interesting to
Brad Anderson wrote:
Got a score of 292 while spending most of the time with just a
sliver of
life. Those sneaky health powerups kept getting knocked off
the screen
before they'd reach me. Fun though.
Regards,
Brad Anderson
Ha! I once got a score of ~1,200 on my Tablet. You get more
On Thu, 15 Mar 2012 18:09:37 +1100, so s...@so.so wrote:
Hello,
Not related to D but this is a community which i can find at least a few
objective person. I want to invest some quality time on a dynamic
language but i am not sure which one. Would you please suggest one?
To give you
On Thu, Mar 15, 2012 at 06:15:39PM -0400, Nick Sabalausky wrote:
H. S. Teoh hst...@quickfur.ath.cx wrote in message
news:mailman.713.1331843912.4860.digitalmar...@puremagic.com...
On Thu, Mar 15, 2012 at 04:13:42PM -0400, Nick Sabalausky wrote:
H. S. Teoh hst...@quickfur.ath.cx wrote in
H. S. Teoh hst...@quickfur.ath.cx wrote in message
news:mailman.712.1331843803.4860.digitalmar...@puremagic.com...
On Thu, Mar 15, 2012 at 03:24:24PM -0400, Nick Sabalausky wrote:
[...]
- If you can stomach the indent-scoping, Python is very well-regarded
and has a lot of fancy advanced
On 16 March 2012 12:05, Nick Sabalausky a@a.a wrote:
H. S. Teoh hst...@quickfur.ath.cx wrote in message
news:mailman.712.1331843803.4860.digitalmar...@puremagic.com...
On Thu, Mar 15, 2012 at 03:24:24PM -0400, Nick Sabalausky wrote:
[...]
- If you can stomach the indent-scoping, Python is
H. S. Teoh hst...@quickfur.ath.cx wrote in message
news:mailman.730.1331851930.4860.digitalmar...@puremagic.com...
On Thu, Mar 15, 2012 at 06:15:39PM -0400, Nick Sabalausky wrote:
H. S. Teoh hst...@quickfur.ath.cx wrote in message
news:mailman.713.1331843912.4860.digitalmar...@puremagic.com...
James Miller ja...@aatch.net wrote in message
news:mailman.733.1331853568.4860.digitalmar...@puremagic.com...
I hate the fact that Flash games are created the way they are. For
one, it's impenetrable to try and learn properly, I had so much
trouble figuring out how to do things properly, you
On Thu, Mar 15, 2012 at 09:50:30PM -0400, Nick Sabalausky wrote:
H. S. Teoh hst...@quickfur.ath.cx wrote in message
news:mailman.730.1331851930.4860.digitalmar...@puremagic.com...
[...]
Oh, I wasn't worried about the licensing part. It's more about
needing to ship dmd + druntime sources
Derek Parnell ddparn...@bigpond.com wrote in message
news:op.wa8hg1dimqne79@derrick-pc.spareco.local...
For a programmable language, you might want to look at Forth. I use it as
an embedded scripting language in a couple of my programs.
Forth is one of those rare ones that seems to be both
Adam D. Ruppe destructiona...@gmail.com wrote in message
news:bighgnfjujyisywpc...@forum.dlang.org...
import std.variant;
struct Extendable {
Variant[string] properties;
Variant opDispatch(string name)() {
return properties[name];
}
Variant opDispatch(string name,
67 matches
Mail list logo