Have you ever placed a 9-volt battery on your tongue? It's not very
pleasant, specially when someone asks you to do it and you don't know
what's coming.
On a serious note, the topic reminds me of an interesting book that I
read; The Design of Everyday Things by Donald Norman, "is one of the
class
bearophile Wrote:
> The "dynamic" C# keyword and other things in other new languages tells me
> that we're going to languages that try to combine the advantages of both.
As I understand, this feature is only to simplify interoperability with dynamic
type systems like ActiveX, DOM and IronPython
Kagamin:
> I rather meant the assertion that in languages with duck type system
> unittesting eliminates to some degree the need for strong type system.
I like both dynamically typed languages and statically typed ones, both have
advantages and disadvantages. The "dynamic" C# keyword and other
Andrej Mitrovic Wrote:
> I still giggle at the "long long" name. Good thing there are no floats
> floats and char chars.
`long` is not a type, it's a modifier and - accidentally - a shortcut for `long
int`.
`long long` is a shortcut for `long long int`.
`short` is a shortcut for `short int`.
`si
bearophile Wrote:
> Kagamin:
>
> > What do you think about unittesting efficiency section?
>
> I always use unit testing, in Python I especially like doctests. But often
> unit tests aren't enough, so I use Contracts too.
I rather meant the assertion that in languages with duck type system
un
Kagamin:
> What do you think about unittesting efficiency section?
I always use unit testing, in Python I especially like doctests. But often unit
tests aren't enough, so I use Contracts too. Type system-based solutions too
help, a quotation I've read elsewhere (written by a Haskell programmer)
bearophile Wrote:
> A better solution:
> http://blog.moertel.com/articles/2006/10/18/a-type-based-solution-to-the-strings-problem
>
What do you think about unittesting efficiency section?
* Nick Sabalausky:
> Is there anything reddit doesn't auto-flag as junk?
Perhaps content that is actually viewable and accessible?
On 5/6/2011 3:50 PM, bearophile wrote:
Walter:
Interestingly, nobody saw all 5 bugs.
A good C lint has caught three of them,
C lint is not standard C.
That's just the trouble with 3rd party tools. They:
1. are not part of the language
2. have wildly varying effectiveness and quality
3. ha
I still giggle at the "long long" name. Good thing there are no floats
floats and char chars.
Walter:
> Interestingly, nobody saw all 5 bugs.
You show this as a bug:
typedef long T;
But did you meant to write this?
typedef long long T;
With this change the C lint finds this bug too.
Bye,
bearophile
Walter:
> Interestingly, nobody saw all 5 bugs.
A good C lint has caught three of them, plus gives an extra suggestion:
8 for (i = 0; i <= dim; i++);
diy.c 8 Warning 574: Signed-unsigned mix with relational
diy.c 8 Info 737: Loss of sign in promotion from int to unsigned int
diy.
On 5/6/2011 1:46 PM, Brad Roberts wrote:
That was the first error I caught.. since I've seen you use it as a common
error and reason to use foreach() style loops before.
Interestingly, nobody saw all 5 bugs.
On Fri, 6 May 2011, Walter Bright wrote:
> On 5/6/2011 8:13 AM, Andrej Mitrovic wrote:
> > Is that a typo on page 31?
> >
> > "<= should be ="
> >
> > maybe<= should be<
> >
> > I guess that further drives the point though. :)
>
> You're right. Good catch.
That was the first error I caught..
"Andrei Alexandrescu" wrote in message
news:iq0eqf$l03$1...@digitalmars.com...
> On 5/5/11 10:18 PM, Andrei Alexandrescu wrote:
>> On 5/5/11 9:04 PM, Walter Bright wrote:
>>> The slides: http://www.slideshare.net/dcacm/patterns-of-human-error
>>>
>>> A review:
>>> http://computopics.dcacm.org/201
On 5/6/2011 8:13 AM, Andrej Mitrovic wrote:
Is that a typo on page 31?
"<= should be ="
maybe<= should be<
I guess that further drives the point though. :)
You're right. Good catch.
Andrej Mitrovic:
> I guess that further drives the point though. :)
Yup .I didn't see it.
Bye,
bearophile
Is that a typo on page 31?
"<= should be ="
maybe <= should be <
I guess that further drives the point though. :)
Walter:
> The slides: http://www.slideshare.net/dcacm/patterns-of-human-error
Nice. Please put your PDFs everywhere but Slideshare. I'd love a simple link to
just the PDF, thank you very much (Slideshare requires Flash, JavaScript, other
things, and the flash viever doesn't allow me copy&paste
On 5/5/11 10:18 PM, Andrei Alexandrescu wrote:
On 5/5/11 9:04 PM, Walter Bright wrote:
The slides: http://www.slideshare.net/dcacm/patterns-of-human-error
A review:
http://computopics.dcacm.org/2011/05/04/review-dcacm-patterns-of-human-error-with-walter-bright/
Anyone want to reddit this?
Nice slides, very simple and elegant.
This reminds me of when I started with D. I found a lot of these 'details'
unload quite some burden I had with C++ and made programming that much more
enjoyable.
On 5/5/11 9:04 PM, Walter Bright wrote:
The slides: http://www.slideshare.net/dcacm/patterns-of-human-error
A review:
http://computopics.dcacm.org/2011/05/04/review-dcacm-patterns-of-human-error-with-walter-bright/
Anyone want to reddit this?
http://www.reddit.com/r/programming/comments/h5eh
The slides: http://www.slideshare.net/dcacm/patterns-of-human-error
A review:
http://computopics.dcacm.org/2011/05/04/review-dcacm-patterns-of-human-error-with-walter-bright/
Anyone want to reddit this?
23 matches
Mail list logo