Giter Site home page Giter Site logo

Comments (9)

 avatar commented on May 22, 2024

I'm still trying to wrap my head around this entire paradigm (functional programming, FRP, etc) and its syntax. However, I'm pretty sure (.) and ($) in Elm work exactly like this: http://stackoverflow.com/questions/940382/haskell-difference-between-dot-and-dollar-sign. Hopefully that link gives you something to mull over and experiment with until someone knowledgable can answer more concretely.

from elm-lang.org.

rodrigob avatar rodrigob commented on May 22, 2024

Thanks for the pointer, but I still think this should be explained in the syntax page, or the syntax page should mention "we expect you to be familiar with Haskell syntax" (or something like that).
This was not a "I do not understand how to use Elm" message it is a "I think the webpage could be improved a little bit if..." message.

from elm-lang.org.

 avatar commented on May 22, 2024

Oh, my bad! I thought you were asking a question. Anyway, I agree. The current information on the syntax page is great if you already have a background in a similar language. However, if you come from a more imperative-style of programming, like myself, you'll find yourself spending a lot of time reading about Haskell syntax and general concepts before you can even experiment with Elm productively.

Alongside your points on the (.) and ($) operators perhaps we can pool some ideas here (or open an issue specifically for this) to make learning Elm and little easier for newcomers? For example, if the concept of "lifting" was explained on the site with a few examples I think I would've been able to experiment a little easier. Lifting is brought up briefly on the "What is FRP" page, but I don't think it does the concept justice at all.

from elm-lang.org.

evancz avatar evancz commented on May 22, 2024

Did you both start looking at Elm after the 0.7 release? That's when the alternative lift syntax (<~) and the record accessor syntax (.label) got introduced, and I was worried that it would cause exactly this kind of confusion.

I'll add something to the syntax page about it, but do you think I should just stick to using lift in all of the examples? That's how it was before, and I suspect it localized the confusion to understanding how lift works.

Also, what would help in understanding lift? There is no central document on that, but until the 0.7 release, a bunch of the examples were dedicated to showing how to use it. Now many of them use the (<~) though, making these examples seem less related to lifting functions onto signals perhaps.

from elm-lang.org.

 avatar commented on May 22, 2024

Yes, I was following the project sometime before but I did not start looking at the examples until after 0.7.

If you want to keep the whole "learn by example" feel to the site I think switching back to using lift in the examples (at least the basic examples) and making a note in the comments about the alternative syntax (<~) would make things less confusing for beginners.

from elm-lang.org.

rodrigob avatar rodrigob commented on May 22, 2024

I started before 0.7, I would agree than explicit lift would make it easier for beginners. For me the key it is to be able to quickly "find the answers" (since <~ is harder to google around, then lift is better).

As a suggestion, for the examples section, having hyperlinking from the source code the documentation would be awesome. You see code, "what the lift function ?", click on the function and jump to the relevant documentation.

Obviously this conflicts with the "right away editable", but this seems not insurmountable (hot hyperlinking, or switch between read and edit mode; most demos would be in read mode by default).

from elm-lang.org.

evancz avatar evancz commented on May 22, 2024

I have locally changed things back to using lift and added more explanation of (<~) in the syntax reference, so that should get pushed to the main site soon.

On the topic of adding tighter integration with the relevant documentation, it looks like madscoaducom is working on just that!

from elm-lang.org.

tomberek avatar tomberek commented on May 22, 2024

Everything has been answered except for $.
Unless I'm wrong, $ has been depreciated in favor of <| and |>
http://docs.elm-lang.org/library/Basics.elm#%3C|

Recommend adding docs.
#66

from elm-lang.org.

evancz avatar evancz commented on May 22, 2024

Great :) We'll see if more ($) questions come up and reassess then.

from elm-lang.org.

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.