Git Product home page Git Product logo

Comments (8)

eduardo-costa avatar eduardo-costa commented on June 16, 2024

Yes! Wish I knew of their existence before :)

from hxnodejs.

nadako avatar nadako commented on June 16, 2024

http://haxe.org/manual/types-abstract-enum.html

from hxnodejs.

ncannasse avatar ncannasse commented on June 16, 2024

Note : that's only if custom user events are not possible

from hxnodejs.

nadako avatar nadako commented on June 16, 2024

They are possible, so we have to use String as event name, but we still can define event sets with enum abstracts instead of classes.

from hxnodejs.

eduardo-costa avatar eduardo-costa commented on June 16, 2024

I think the enums should only serve as shortcut to the user.

The emitter interface shoul always be String though.
Em 06/10/2014 09:28, "Dan Korostelev" [email protected] escreveu:

They are possible, so we have to use String as event name, but we still
can define event sets with enum abstracts instead of classes.


Reply to this email directly or view it on GitHub
#1 (comment)
.

from hxnodejs.

waneck avatar waneck commented on June 16, 2024

If you use @:enum abstract Something(String) from String, we can still allow custom strings while still being able to benefit from the enumerated types as needed

from hxnodejs.

eduardo-costa avatar eduardo-costa commented on June 16, 2024

Yes.
Will do.

2014-10-06 15:13 GMT-03:00 Cauê Waneck [email protected]:

If you use @:enum abstract Something(String) from String, we can still
allow custom strings while still being able to benefit from the enumerated
types as needed


Reply to this email directly or view it on GitHub
#1 (comment)
.

[image: Imagem inline 1]

from hxnodejs.

nadako avatar nadako commented on June 16, 2024

Most of those are already changed to @:enum abstracts. Closing this one.

from hxnodejs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.