A few notes on choosing between Go and D for a quick project

Russel Winder via Digitalmars-d digitalmars-d at puremagic.com
Sat Mar 14 10:53:17 PDT 2015


On Sat, 2015-03-14 at 09:56 -0700, Andrei Alexandrescu via Digitalmars-d
wrote:
> On 3/14/15 1:40 AM, Russel Winder via Digitalmars-d wrote:
> > On Fri, 2015-03-13 at 16:13 -0700, Andrei Alexandrescu via Digitalmars-d
> > wrote:
> >> On 3/13/15 2:22 PM, Russel Winder via Digitalmars-d wrote:
> >>> On Fri, 2015-03-13 at 10:31 -0700, Andrei Alexandrescu via Digitalmars-d
> >>> wrote:
> >>> […]
> >>>
> >>>>
> >>>>      File("/tmp/a").byChunk(4096).joiner.startsWith(s)
> > […]
> >>
> >> How do you mean "conversely"? Maybe you meant "incidentally"? -- Andrei
> >
> > In functional languages, each stage in the pipeline returns Option to
> > avoid error handling. Go does not give you this facility as it refuses
> > to allow activity without proper error checking.
> 
> Go does not give you this facility for a multitude of reasons, starting 
> with its lack of generic programming.

This is not the reason, although it is a huge factor, the following is…
> 
> > So if byChunk returns a failed read, functional language just carry on,
> > Go would force the error check, D does…
> 
> D throws an exception. Is that good or bad?

Works for me, unacceptable in Go which forbids exceptions for anything
other than termination.

-- 
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/attachments/20150314/5d0bb536/attachment.sig>


More information about the Digitalmars-d mailing list