Python's features, which requires D

Russel Winder via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat May 23 07:29:19 PDT 2015


On Sat, 2015-05-23 at 12:58 +0000, Dennis Ritchie via
Digitalmars-d-learn wrote:
> On Saturday, 23 May 2015 at 10:58:33 UTC, Kagamin wrote:
> > Well, list comprehension is built into language in python (and 
> > not in D), such level of support is definitely more streamlined.
> 
> Well, what's to keep D more functions to work with slist and 
> dlist ?
> In my opinion, lists in D completely bald :)
> 
> After all, there is a module in Phobos std.array, so why not make 
> the module std.list.
> Do lists in D can be done as powerful as arrays?

The issue is performance, especially for random access to the sequence.
Not all abstractions are equal! List structures are only really useful
in very limited circumstances, generally you want more efficient
sequence realizations: array, deque, etc.

It is also probably worth noting that lists in Python are not singly or
doubly linked lists, they are arrays.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150523/faf757b4/attachment.sig>


More information about the Digitalmars-d-learn mailing list