[erlang-questions] Request feedback on example project

Joe Armstrong <>
Sat Feb 6 09:28:40 CET 2016


On Wed, Feb 3, 2016 at 7:00 AM, zxq9 <> wrote:
> Two days ago I wrote a simple UUID utility as an example of bit syntax.
> Yesterday I decided I wanted it to be an example of documentation and
> readability as well.

I took a quick look and liked what I saw.

In my opinion one should publish documentation and compiled code.
If the user needs to see the source then the documentation is inadequate
source should be available if requested and for the purpose of modification
but not because the documentation is inadequate.

You documentation is excellent.

One tiny point in

http://erlang.org/pipermail/erlang-questions/2015-March/083879.html

I argued that interfaces should be *minimal* - you export uuid:string
and uuid:binary

I'm beginning to dislike code where I can call functions with polymorphic
arguments, filenames that can be strings, atoms, I/O lists whatever.

I feel like shouting - "make you mind up". Do you want me to call your
library through the string or binary interface?

I would reason like this. "Should a user see the printed representation of
UUIDs or should they be hidden from sight?" I think UUID's should not
be seen by humans only by programs - therefore only the binary interface
should be available which will encourage this usage. So remove the
uuid:string functions.

Cheers

/Joe





>
> I would like feedback from new and old Erlangers in terms of readability,
> documentation, what is easy to understand, what is hard to understand, etc.
> My goal is to develop a style plain enough that a utility application just
> above the threshold of clear triviality (like a UUID utility) is mostly
> understandable even to someone new to Erlang.
>
> https://github.com/zxq9/zuuid
>
> No ninja tricks should be in there. If there are any please bring them to
> my attention so they can be removed.
>
> Thanks
>
> -Craig
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions


More information about the erlang-questions mailing list