Comments (7)
Should this be done when right side is primitive only?
from elchemy.
@baransu Not particularly. It can be any expression.
For example in Elixir
@port = "1234" |> String.to_integer
Is a valid code
And so should be
port = "1234" |> String.toInt
But obviously we should denote somehow that @a \= a
from elchemy.
So in Elixir @a
is a const pasted into place where @a
is used during compilation, right? So how do you want to distinguish when to convert Elm function to module attribute?
from elchemy.
Yes. Module attributes are calculated during compilation, and then pasted in every place they're used.
There probably should be some naming convention for them.
Like at_name
-> @name
.
But unfortunately Elm removed option to have variables names starting with any symbol.
from elchemy.
We should add @doc
to blacklist for module attributes since we handle it by doc comments.
from elchemy.
Do we need it at all? We're writing Elm so simple function would work. It will be executed during runtime so we will have performance loss but after all module attributes are not every heavy performance wise.
from elchemy.
it might be true. I don't think there is any sense of using it other than:
@a 1
being shorter than
defp a(), do: 1
but with a = 1
we don't have that problem at all. I think you might be right @baransu
from elchemy.
Related Issues (20)
- Write a prompt checking for newer versions of Elchemy when executing in a project
- New projects no longer work with current instructions HOT 2
- Bug: Clean makes init not able to work HOT 2
- Elchalyze HOT 3
- Document how to use meta/Plugins feature
- Update Elchemy init script to work with Erlang 21 and higher HOT 4
- Update Elchemy installation instructions in the Hackernoon tutorial HOT 1
- Prepare for Elm 0.19 HOT 6
- Redesign elchemy-live to work with new CDN and brand new Ellie design HOT 3
- Develop our own type checker HOT 6
- FFI Type checking broken with Elixir 1.7
- Warn users against usage with Elixir .1.7 HOT 1
- Disable `verify` macro in Elixir 1.7 HOT 1
- Test Elixir 1.7.1-1.8 compatibility HOT 14
- Your stance to Elm HOT 6
- Add custom type inference HOT 4
- slack invitation link not valid HOT 1
- Ellie can not delete characters HOT 4
- Evaluation of alternative front end implementation HOT 1
- Elchemy-live doesn't work HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elchemy.