This is true, but I think in the docs, they are talk about the way of 
thinking of the records and not the access part.
Because if this is the case we can say it's also similar to java object, we 
also access their variables with the dot notation.
And PHP and C++ are a bit similar, but instead of a dot we use the arrow 
symbol.

That's why I think the emphasis here are on key-value pairs and not on the 
way you access their values.
Obviously, objects aren't the same as key-value pairs. And the way you 
access values in key-value pairs, or variables of an object is just depend 
on the specific syntax of the language.
The idea of objects or key-value pairs are bigger then the syntax of the 
language (it's like how you write an if statement in every other language, 
the syntax is a bit different but the idea is the same).

On Thursday, July 14, 2016 at 8:43:09 AM UTC+3, Peter Damoc wrote:
>
> Hi Nir and welcome to Elm, 
>
> I also come from Python and I consider the statement to be correct. 
> Please notice that the word "similar" is used not "exactly". For accessing 
> purposes, Elm records behave similar enough to python objects. 
>
> If I have a python object with the fields "name" and "surname" I can 
> access those fields with user.name, user.surname. 
> If I have a python dictionary with the same keys, I access them with 
> user["name"] and user["surname"] which is a little bit different from Elm. 
>
>
>
>
>
> On Thu, Jul 14, 2016 at 8:20 AM, Nir Galon <[email protected] 
> <javascript:>> wrote:
>
>> Hi,
>> I'm a Python developer, and I"m just getting into elm.
>> I start by reading the documentation and I notice an error in 
>> core_language <http://guide.elm-lang.org/core_language.html> page. I try 
>> to find the website source code and do a PR, but with no success (found the 
>> website source code, but the docs isn't there).
>> The error is in `Records` section, when it says `A record is a set of 
>> key-value pairs, similar to objects in JavaScript or Python.` - It's 
>> actually not true in Python, In Python key-value pairs called 
>> `dictionaries`.
>> So the true sentence should by: `A record is a set of key-value pairs, 
>> similar to objects in JavaScript and dictionaries in Python`.
>>
>> I would appreciate any help on how to find the source code so I can do a 
>> PR and fix this.
>> Nir Galon
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Elm Discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> There is NO FATE, we are the creators.
> blog: http://damoc.ro/
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to