Advice about adding Either<L, R> to the standard library?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Advice about adding Either<L, R> to the standard library?

sledorze

..I couldn't resist, sorry.. :p

Reply | Threaded
Open this post in threaded view
|

Re: Advice about adding Either<L, R> to the standard library?

Juraj Kirchheim
Now that is a great idea, although multitypes would also be a good
alternative: http://haxe.org/com/features?version=7114 :D

On Fri, Nov 11, 2011 at 2:02 PM, sledorze <[hidden email]> wrote:

>
> ..I couldn't resist, sorry.. :p
>
>
>
> --
> View this message in context: http://haxe.1354130.n2.nabble.com/Advice-about-adding-Either-L-R-to-the-standard-library-tp6985285p6985285.html
> Sent from the Haxe mailing list archive at Nabble.com.
>
> --
> haXe - an open source web programming language
> http://haxe.org
>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Advice about adding Either<L, R> to the standard library?

sledorze
Difficult to switch against them, without runtime representation .. Needs other kind of compilers or to box them with anonymous enums under thé hood.. I think that s thé reason it has not been done in haxe so far..

Sent from my iPhone

On 11 nov. 2011, at 14:44, "Juraj Kirchheim [via Haxe]" <[hidden email]> wrote:

Now that is a great idea, although multitypes would also be a good
alternative: http://haxe.org/com/features?version=7114 :D

On Fri, Nov 11, 2011 at 2:02 PM, sledorze <[hidden email]> wrote:

>
> ..I couldn't resist, sorry.. :p
>
>
>
> --
> View this message in context: http://haxe.1354130.n2.nabble.com/Advice-about-adding-Either-L-R-to-the-standard-library-tp6985285p6985285.html
> Sent from the Haxe mailing list archive at Nabble.com.
>
> --
> haXe - an open source web programming language
> http://haxe.org
>

--
haXe - an open source web programming language
http://haxe.org



If you reply to this email, your message will be added to the discussion below:
http://haxe.1354130.n2.nabble.com/Advice-about-adding-Either-L-R-to-the-standard-library-tp6985285p6985395.html
To unsubscribe from Advice about adding Either<L, R> to the standard library?, click here.
See how NAML generates this email
Reply | Threaded
Open this post in threaded view
|

Re: Advice about adding Either<L, R> to the standard library?

Nicolas Cannasse
In reply to this post by sledorze
Le 11/11/2011 14:02, sledorze a écrit :
>
> ..I couldn't resist, sorry.. :p

Answer to both topics : I'm a bit reluctant to add a pattern in the
standard library that is not actually used by the standard library
itself, especially since you might want more and more of these ;)

I'll suggest that people interested in this create together a standard
functional library that you can simply rely on for common type
definitions and some algorithms. It should not predate existing
libraries but instead provide a common ground on top of which they can
implemented.

Best,
Nicolas

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Advice about adding Either<L, R> to the standard library?

sledorze
(chicken and egg problem..)
Anyway, I think it make sense to see it as a minimal standard cross-platform library and not a lot more above.
That makes sense, however it brings fragmentation - even if I'm a darwinian, I think it stops before some interesting areas that would be valuable and spread good practices.

I try to be honest and objective, not to denigrate.
And I think I'm not going to quit haXe before a long time, still the best solution out there..
..got to ask John about making stax part of haxelib.. :)

Stephane

P.S.: btw, this second post was a joke about the first one..