On Feb 21, 10 00:41, Andrei Alexandrescu wrote:
KennyTM~ wrote:

Major silly names:

- std.file.slurp

http://search.cpan.org/~dconway/Perl6-Slurp-0.03/Slurp.pm
http://code.google.com/p/python-pipeline/wiki/slurp


It maybe very common in Perl, but a name used by one or two languages/non-standard libraries cannot be a proof that it's a good name or widely used outside that circle.

(I prefer "readLines" or "parseLines")

- std.iterator.retro, std.range.retro

Some arond here seem to be very comfortable about it. Anyway, let's find
another one (can't be "reverse").

- std.random.dice (it is a discrete distribution...)

What's wrong with dice?


The name, it sounds silly, that's it ;) (My alternatives will be very long and you won't use it anyway.)

- std.range.cons

http://en.wikipedia.org/wiki/Cons

As if I knew Lisp. (See slurp) ("prepend")


- std.range.iota

C++, APL, Go:

http://bytes.com/topic/c/answers/446688-iota
http://en.wikipedia.org/wiki/Iota


Shall we rename "cos" to "circle(2, x)"? (See slurp)

("range", or make a..b into a range.)

- std.string.chomp, chompPrefix, chop

http://perldoc.perl.org/functions/chomp.html
http://www.pageresource.com/cgirec/ptut13.htm
http://php.net/manual/en/function.chop.php
http://ruby-doc.org/core/classes/String.html#M000819


OK.

- std.string.munch

Inspired from here:

http://en.wikipedia.org/wiki/Maximal_munch

"match". Or "parsePattern" as used in std.metastrings. (Or rename them into "munchInteger"?)


- std.string.sformat

Alternative?


"formatBuffer". What does the "s" mean anyway?

- std.utf.stride (which is totally different from std.range.stride)

Agreed. Alternative?


"sequenceLength", "codePointLength", or rename std.range.stride to "skip".

Minor annoyances:

- std.contracts.enforceEx (sounds like Win32 API which you should use
in favor of enforce.)

Agreed. Alternative?

"exceptionEnforce", similar to "errnoEnforce".


- std.path.rel2abs (why not relToAbs?)

It's shorter and apparently there's no trouble in understanding it.


I agree.

- std.range.sameHead (should be sameFront?)

Agreed.

- std.stream.Stream.readBlock & writeBlock (sounds like blocking vs
non-blocking operations, esp. for SocketStream.)

std.stream will be terminated.


OK.

- and many inconsistent naming conventions, e.g.
* std.string.ljustify vs stripl
* std.string.countchars (all lower) vs inPattern (CamelCase)

This is Walter's experiment of wheelbarrowing string functions from
several languages into std.string. I'd like to fix that.


Nice to know that.


Andrei


Reply via email to