News for hackers. Stuff that matters.
Re:Strong Types and Their Impact on Testing by TeeWEE on Tuesday November 18, 2014 @12:50PM (#8625144)
Imho types should make the programmer live easier, not more difficult. Looking at the first code, and at the second peace of code. Imho the second piece of code is easier to read, but it does lack validation logic & testing.

First of all, from a type-theory point of view, both Email and WebForm have the same type. (same signature).

Also from a theoretical point of view, i think a type should not have an instance if its not valid and "EmailAddress" of value "aasda" should not exists. However it is allowed in his types.

Also, I don't see how defining lots of very specific types such as FromAddress and ToAddress are really making live easier.

Something like this does the job, and is typesafe (in golang):

  type EmailAddress string

  type Email struct {
    to EmailAddress
    from EmailAddress
    subject string
    body string
  }

  func sendEmail(webForm string) err = {
    email, err := validateEmailForm(form) # performs validation
    if err {
      return err
    }
    err := email_service.sendEmail(email)
    if err {
      return err
    }
  }

Tests will simply use the returnValue of sendMail to validate its inner working.
Re:Strong Types and Their Impact on Testing by dllthomas on Tuesday November 18, 2014 @01:31PM (#8625396)
Having a separate FromAddress and ToAddress serves a somewhat similar purpose to labeled arguments. You can't mix them up, and you are informed if they change.
Re:Strong Types and Their Impact on Testing by xwowsersx on Tuesday November 18, 2014 @12:54PM (#8625167)
Good point. Having a separate FromAddress and ToAddress was probably overkill. You're right about the WebForm and Email having the same type. The form submission could probably just produce an Email directly.

I don't know much about go. What is "err"?

Re:Strong Types and Their Impact on Testing by icebraining on Tuesday November 18, 2014 @12:58PM (#8625186)
Go follows the C tradition of returning errors instead of using exceptions. 'err' is a variable of type "error"[1], which should either be nil or have an error value.

[1] http://golang.org/pkg/builtin/#error

Re:Strong Types and Their Impact on Testing by xwowsersx on Tuesday November 18, 2014 @01:02PM (#8625213)
so the return type of this little program is "error" and nil if no error?
Re:Strong Types and Their Impact on Testing by icebraining on Tuesday November 18, 2014 @01:11PM (#8625283)
Yes. It's either a value that implements the 'error' interface or nil.
Re:Strong Types and Their Impact on Testing by badbath on Tuesday November 18, 2014 @01:17PM (#8625318)
That's nuts. All of your code now has to check if err != nil, etc.

Furthermore, the sendEmail and validateEmailForm values are essentially ignored and used only for their possible error values.

Why should I wrote my program as if the thing I'm concerned primarily with is errors? Much better to encode the failure into the type. You could have, for example, some function that returns Either[Error, SendEmailAction] where SendEmailAction is a function that, when called, will perform the effect of sending an email. Now I can deal with the happy path by mapping on the right-biased Either.

Re:Strong Types and Their Impact on Testing by icebraining on Tuesday November 18, 2014 @01:39PM (#8625462)
This has been discussed in pretty much every golang thread here on HN :)
Re:Strong Types and Their Impact on Testing by TeeWEE on Thursday November 20, 2014 @12:45PM (#8636986)
When I started go, i also thought it was nuts. And it indeed clutters your code a lot. But in the end, i like it.

Golang is a really simple language, but all the simple concepts, and the lack of OOP, forces you to think more about your code. Also you are forced to think about error conditions.

I'm still playing around with it. So i dont have a final opinion on go.

Re:Strong Types and Their Impact on Testing by ecopoesis on Tuesday November 18, 2014 @01:39PM (#8625461)
Not if you use Scala. With Scala, you'd just map or for comprehension over the result.
Re:Strong Types and Their Impact on Testing by masklinn on Tuesday November 18, 2014 @01:58PM (#8625611)
That's what he covers in his third paragraph...
Re:Strong Types and Their Impact on Testing by codygman on Tuesday November 18, 2014 @04:30PM (#8626477)
Well, to be fair it's if you use any language that uses some equivalent of the Maybe Monad.
Re:Strong Types and Their Impact on Testing by marcelk on Tuesday November 18, 2014 @03:59PM (#8626314)
Interesting article, especially encoding as much domain knowledge as possible into types by encapsulating simple strings/ints/etc into case classes. Fully agree :)

However, performing validation outside of the model makes it possible to create a model with invalid data. For example, calling val x = EmailAddress("@") would pass. Thus, a developer must remember to call the validation every time they create such a case class. In my experience, this wouldn't hold since developers are as lazy as the code allows them to be.

Instead, why not include requirements directly into a case class constructor. For example:

  case class EmailAddress(addr: String) {
    private val emailRegexp = ...
    require(emailRegex.findFirstIn(addr).isDefined, s"Email $addr not valid")
  }
In this way, one can be sure that an EmailAddress case class always holds a correct email and can always safely rely on this assumption. Also, one can easily test (e.g. with ScalaCheck) that the constructor throws an IllegalArgumentExceptin.

The only downside is the conversion of these exceptions into Either, Scalaz Disjunctions or Scalaz Validation. Of course, it's not that pretty and idiomatic to convert try-catch blocks into Either. But IMHO, it's a small cost in exchange for the guarantee that if your model exists it must be valid.

Re:Strong Types and Their Impact on Testing by Offler on Tuesday November 18, 2014 @12:58PM (#8625188)
3. By using meaningful values and separating side-effecting functions from pure ones, we can more easily reason about our program

I'm not sure how that's something that static typing provides, just seems like good functional programming/referential transparency.

Re:Strong Types and Their Impact on Testing by sgrove on Tuesday November 18, 2014 @01:33PM (#8625408)
True, but signatures help statically verify that side-effects can't happen at a call site, giving you reassurances that it's non-side-effecting. Same with referential transparency, I believe.
Re:Strong Types and Their Impact on Testing by xwowsersx on Tuesday November 18, 2014 @01:46PM (#8625503)
Inspired by this Twitter convo, for those who care: https://twitter.com/LeviNotik/status/534190509947097089
Re:Strong Types and Their Impact on Testing by serve_yay on Tuesday November 18, 2014 @01:26PM (#8625368)
> we can easily shoot ourselves in the foot. We might mistakenly write Email("hello", "jason", "[email protected]", "body of email"), for example.

I would just solve that with keyword arguments. Or, in Javascript, have the constructor take an object whose keys are fromAddress, toAddress, etc. (Pretty much the JS/ES5 version of keyword args.)

Re:Strong Types and Their Impact on Testing by xwowsersx on Tuesday November 18, 2014 @01:37PM (#8625440)
And then if you're missing a key in your object, your program blows up at runtime.
Re:Strong Types and Their Impact on Testing by serve_yay on Tuesday November 18, 2014 @02:35PM (#8625825)
In JS, true. You can't do any of this stuff in JS! :)

But I guess my real point was that that seemed like more of an argument against positional parameters than for lots of typing. I like how ObjC handles this, I wish more languages did it that way.

Re:Strong Types and Their Impact on Testing by jimbokun on Tuesday November 18, 2014 @03:59PM (#8626319)
What's with functional languages and the obsession with naming things after random sequences of punctuation characters?

    validateFrom(form.from).toValidationNel |@| validateTo(form.to).toValidationNel |@| validateBody(form.body).toValidationNel |@| validateRecipient(form.recipient).toValidationNel)(Email.apply)
What's the difference between "|@|" or "@" or "|@" or "|@" or "@@" or "@@@" or...

I'm sure this made perfect sense to someone at the time this decision was made, but naming things this way does absolutely nothing to help someone reading the code or using your library for the first time.

Can anyone explain the motivation for naming things in this way?

Re:Strong Types and Their Impact on Testing by xwowsersx on Wednesday November 19, 2014 @11:04AM (#8630740)
Because they represent a well-known concept in category theory and symbols are a simple, uniform way of representing that concept. It's terminology. Math has terminology and so does category theory. Should we write (3 multiplied by 2 added to 5) in math? No. We write 3 * 2 + 5. Once you know those symbols, they're well understood and concise.
Re:Strong Types and Their Impact on Testing by aharris88 on Tuesday November 18, 2014 @01:07PM (#8625258)
What is this written in reply to?
Re:Strong Types and Their Impact on Testing by xwowsersx on Tuesday November 18, 2014 @01:09PM (#8625269)
Re:Strong Types and Their Impact on Testing by darrencauthon on Tuesday November 18, 2014 @01:40PM (#8625467)
Yes, my gist, but also a Twitter conversation on how strong typing altered the need for tests. I've heard from a couple Haskell programmers about how the language practically eliminated the need for tests. I don't see how that's possible, but I also know Haskell.

I asked for a specific code example, and I threw out the scenario of a client who wants a contact us form that logs all responses and sends notification emails. I threw out a simple Ruby example where I tested the functionality, and I'm waiting to see the alternative.

Re:Strong Types and Their Impact on Testing by tome on Tuesday November 18, 2014 @04:23PM (#8626439)
Haskell does not practically eliminate the need for tests. I am very concerned that Haskell programmers are getting the reputation for claiming such things because they're simply not true.

Haskell's type system does statically check many things you might want to write tests for which makes those particular tests unnecessary, but it doesn't eliminate the need for tests in general. If you hear any Haskell programmers making claims that sound like that please ask them to be more precise.

Re:Strong Types and Their Impact on Testing by film42 on Wednesday November 19, 2014 @01:04PM (#8631538)
Exactly! Even though haskell is pure, it's impure in the context of the complete system.
Re:Strong Types and Their Impact on Testing by teacup50 on Tuesday November 18, 2014 @01:46PM (#8625505)
Are you waiting to see the alternative, or waiting to be right?

The example given seems clear enough to extrapolate from.

Re:Strong Types and Their Impact on Testing by darrencauthon on Tuesday November 18, 2014 @02:08PM (#8625667)
I'm waiting to see the alternative.

It's an honest question to ask in the face of an assertion about testing -- or how strong or static typing eliminates the need to verify that the code behaves as written. In the sample I provided, I provided a concrete example as to how I could verify that the code accomplishes the task. If tests are not needed, then fine... show me how with code that accomplishes the task and that show how.

Like the "unit" where the two operations are covered in one method... Sure, but how else would it be done? The client asked for the log and the email, so somehow, someway... someone has to write code to do it.

I threw up my Ruby sample in just a few minutes... why can't the alternative be coded up in a few more?

Re:Strong Types and Their Impact on Testing by codygman on Wednesday November 19, 2014 @10:10AM (#8630405)
How does what the OP posted not qualify as an alternative?
Re:Strong Types and Their Impact on Testing by michaelochurch on Tuesday November 18, 2014 @12:58PM (#8625183)
Static types.

Python is strongly typed, although possibly not as much as we might hope. This fails:

    "cat" + 1
with a type error, but it happens at runtime. (Oddly enough, Scala permits it.) Python's type system isn't very expressive-- for example, you have "list" and "dict" types but not "list of int"-- and since you can branch without type congruence (because Python's "if" is a statement, not an expression) you can lose static knowledge pretty quickly, but Python does block type errors. It just does so at runtime, which means that the problem may be hard to reproduce and the error/failure distance can be high.

I agree with most of what's said in the OP. I just want to push back against the use of "strong" and "static" typing as if they were interchangeable. I'm in the same boat-- generally an advocate for compile-time static typing-- but to conflate static/dynamic with strong/weak is to misrepresent the issue, and unfair to the dynamically-typed languages. All of the modern dynlangs (e.g. Python, Ruby, Clojure) enforce type safety. They just do it at runtime, whereas Haskell, Scala and Ocaml do it at compile time.

Re:Strong Types and Their Impact on Testing by icebraining on Tuesday November 18, 2014 @01:06PM (#8625248)
Python's type system isn't very expressive-- for example, you have "list" and "dict" types but not "list of int"

Sure you can.

  >> from array import array
  >> a = array('i')
  >> a.append(3)
  >> a
  array('i', [3])
  >> a.append('Hello')
  TypeError: an integer is required
The default "list" type just happens to be an heterogeneous list.
Re:Strong Types and Their Impact on Testing by bunderbunder on Tuesday November 18, 2014 @01:26PM (#8625367)
All of the modern dynlangs (e.g. Python, Ruby, Clojure) enforce type safety.

Well, a lot of them. Some are weakly typed, and IMO weak typing is genuinely damaging whereas I'll concede some room for the static/dynamic debate.

Example: What's "1" + 1?

Answer: In JavaScript, it's "11". In PHP, it's 2. Meaning it's possible that it could mean two different things in the same file.

Re:Strong Types and Their Impact on Testing by dragonwriter on Tuesday November 18, 2014 @02:50PM (#8625914)
That's not a weak typing artifact, its an artifact of the fact that different languages use operators with the same name but with different semantics. (And the fact that you can have PHP and JS, which are different languages, in the same file.)

You could have the same issue with languages with indisputably strong, static typing with different semantics if there was a way of embedding them in the same file.

Re:Strong Types and Their Impact on Testing by bunderbunder on Tuesday November 18, 2014 @08:03PM (#8627544)
Language that value strong type-safety guarantees won't respond to a request for "1" + 1 by quietly coercing one value to the other's type and moving along as if nothing strange happened. They'll generate a type mismatch error because adding an integer to a text string is undefined operation.
Re:Strong Types and Their Impact on Testing by dragonwriter on Tuesday November 18, 2014 @09:43PM (#8627933)
Perhaps (though, discarding the emotional language of "quietly" and "as if nothing strange happened", there's all kinds of things in strong, statically-typed languages that aren't much different structurally from that, though if they did it would usually be by way of an operator working on a typeclass which included a total, rather than partial, conversion function to support the operation, so that the semantics of addition of string and whatever numeric type it was supported with would be well defined for all strings, rather than being only defined for particular strings; then again, its not like Haskell doesn't have functions that crash on values of an appropriate type but unsuppored specific values, so maybe not), but, in any case, f a b (or f(a,b) or (f a b) or a op b, depending on the syntax of the languages involved and the kind of function/operator at issue) having two different meanings in two different languages (specifically, two that can be included in the same file), which was what was complained about that example, isn't something that only occurs with that example, and it certainly can occur in strong statically-typed languages without even considering hypothetical constructs.
Re:Strong Types and Their Impact on Testing by dllthomas on Tuesday November 18, 2014 @01:37PM (#8625445)
"Meaning it's possible that it could mean two different things in the same file."

If you're spanning languages, that's not unusual. I have Haskell code with C in quasiquotes. What's x /= 2?

Re:Strong Types and Their Impact on Testing by xwowsersx on Tuesday November 18, 2014 @01:05PM (#8625238)
You're right. I wasn't precise and conflated those issues. Thank you.
Re:Strong Types and Their Impact on Testing by michaelochurch on Tuesday November 18, 2014 @01:18PM (#8625326)
You are far from the first. Many, many years ago, I made a more embarrassing mistake. I insisted in a job interview that OCaml was dynamically typed because it didn't require explicit typing. (To my naive eye, it "looked" like a dynlang). When I realized that I was interviewing with an expert, I backed off and admitted that I was wrong, not entirely sure why but not about to argue with someone who knew the language in depth. (And, of course, I was wrong.) I still got the job.

I'd actually argue that strong vs. weak is a continuum and somewhat subjective. One of my gripes with Scala is that the type system (as used in the field) isn't strong enough. It will implicitly auto-promote types in ways you might not want (i.e. List[Int] :+ String = List[Any]). It can be a strong type system, but the quality of programmers has a huge influence on your experience with Scala. If you have bad programmers who do things the Enterprise Java Way, you can quickly end up with compile-speed issues. But that's another rant. Scala's great for mid-sized projects or when the developers are strong.

Re:Strong Types and Their Impact on Testing by jimbokun on Tuesday November 18, 2014 @03:47PM (#8626240)
"It will implicitly auto-promote types in ways you might not want (i.e. List[Int] :+ String = List[Any])."

Wow, that seems to totally miss the point of using types to help you catch errors.

Re:Strong Types and Their Impact on Testing by kod on Tuesday November 18, 2014 @09:46PM (#8627943)
No, because if you then try to call an Int-specific method on an item from that List[Any], you will still get a compile time error.
Re:Strong Types and Their Impact on Testing by HolyHaddock on Wednesday November 19, 2014 @06:34AM (#8629430)
Silently inferring List[Any] is like a null reference. The error that you get told about is in a different place to where the problem that you need to fix is. In this case, the static type system could have been more helpful.

There have been attempts to fix this - WartRemover specifically has a Wart for any uses of Any for example.

Re:Strong Types and Their Impact on Testing by kod on Wednesday November 19, 2014 @01:26PM (#8631661)
No, a compile time error is nothing at all like a runtime null pointer exception.

Given that the language supports subtype polymorphism, this is exactly how the type inference should work. Any is the narrowest available supertype.

If you don't like it, there's a pretty simple fix: add an explicit type ascription, which you should be doing for the return values of any methods anyway.

Re:Strong Types and Their Impact on Testing by dllthomas on Wednesday November 19, 2014 @06:17PM (#8633344)
It's like a null reference in that both increase the distance between the error and the report of failure, and both have a way of working correctly.

The distinction between compile time failure and runtime failure is an important one, but not the only thing going on.

Re:Strong Types and Their Impact on Testing by xwowsersx on Tuesday November 18, 2014 @02:09PM (#8625669)
Hehe, fun story. Totally agree with you about Scala. I'm hoping to do all future development in Haskell.
Re:Strong Types and Their Impact on Testing by pekk on Tuesday November 18, 2014 @01:53PM (#8625561)
What would it help, in Python, to have 'list of int'?
Re:Strong Types and Their Impact on Testing by _yosefk on Tuesday November 18, 2014 @02:53PM (#8625933)
A more compact representation is one advantage - that's why numpy has array of int.
Re:Strong Types and Their Impact on Testing by codygman on Wednesday November 19, 2014 @10:16AM (#8630440)
You don't have to validate all objects inside of that list are an int or handle cases via duck typing, exceptions, etc.

As _yosefk said, the interpreter can assume a more compact representation.

Re:Strong Types and Their Impact on Testing by mikeash on Tuesday November 18, 2014 @01:06PM (#8625245)
I agree, it would be good to tighten up the terminology. "Weak typing" should be reserved for stuff where the underlying bits can get reinterpreted at will, e.g.:

    printf("%d", 42.0);
Strong typing means the type of each chunk of memory is known and can't be arbitrarily changed, and then static/dynamic refers to how much type information is present at compile time.

Might be a losing battle, though. Strong/weak has been overloaded in this way for a long time.

Re:Strong Types and Their Impact on Testing by bunderbunder on Tuesday November 18, 2014 @02:12PM (#8625687)
I'm inclined to call that "optionally typed". As in, values nominally have a static type associated with them, but it's possible (even easy) to bypass the type system.

C#, for example, is mostly strong and static. But within 'unsafe' contexts you're allowed a lot of those kinds of C-style shenanigans, and you can replicate C unions using the StructLayout and FieldOffset attributes, so the type system is ultimately optional.

I think of weak typing as a whole continuum of different things. At an extreme end you have C's level of optional typing. But there's also more tame stuff like implicit casting (which C# also has) that I'd also count as a form of weak typing.

Re:Strong Types and Their Impact on Testing by AnimalMuppet on Tuesday November 18, 2014 @03:34PM (#8626161)
Well, printf is a vararg function, so even what type checking C has is out of play (except for the first parameter).

C doesn't just let you reinterpret bits at will. You have to jump through one of a few very specific hoops. You have to cast, you have to use a union, or you have to use a vararg function. (Granted, those are some pretty big hoops, but my point is, you have to use one in order to reinterpret bits.)

I don't think C's type promotion rules are in the same category. You can promote a short to a double when adding it to a double, but that's not exactly "reinterpreting bits at will".

Re:Strong Types and Their Impact on Testing by mikeash on Tuesday November 18, 2014 @03:42PM (#8626208)
Or you can call a function without a prototype (no longer allowed in C99, thankfully), call a function whose prototype's type signature doesn't match the implementation, access a global variable whose declaration doesn't match the definition, access a struct using a different declaration than the one used by whoever put the data there in the first place, or just do an accidental type pun through a void *, which requires no casting. It's not at all hard to do by accident. Much of this is why binary compatibility for libraries written in C is so hard to achieve over the long term.

I agree that type promotion isn't the same, but I didn't mention that anyway....

Re:Strong Types and Their Impact on Testing by AnimalMuppet on Tuesday November 18, 2014 @03:58PM (#8626307)
Argh. I forgot that C doesn't do name mangling. Most of those problems go away in C++, though (he said hopefully, but without complete confidence...)
Re:Strong Types and Their Impact on Testing by mikeash on Tuesday November 18, 2014 @04:10PM (#8626371)
The problem of mismatched prototypes goes away (except for extern "C" functions, of course) but then you get fun stuff like fragile base classes. If you have a base class in a library and a subclass in an application that links against that library, you can never add a virtual function to the base class again without breaking backwards compatibility (and causing all sorts of accidental type-punning chaos when you try to call methods).
Re:Strong Types and Their Impact on Testing by masklinn on Tuesday November 18, 2014 @02:03PM (#8625640)
> "Weak typing" should be reserved for stuff where the underlying bits can get reinterpreted at will, e.g.:

> printf("%d", 42.0);

which does not demonstrate your point and is valid Python:

    >>> "%d" % 42.0
    '42'
also the more odd

    >>> "%.2f" % True
    '1.00'
and who could forget

    >>> "foo" * 3
    'foofoofoo'
edit: forget about this, for some reason I'd forgotten what the example would output…
Re:Strong Types and Their Impact on Testing by djur on Tuesday November 18, 2014 @02:37PM (#8625837)
Your first Python example is just numeric coercion, not weak typing. Haskell does numeric coercion too (try 2 + 1.1 in ghci). C does not behave like Python and print 42 in this example. Try it yourself and see.

True being coercible to a number is unfortunate, but it's still not the same as what C does with that printf.

"foo" * 3 is just an example of a polymorphic operator. You could implement the same in any strongly typed language that allows polymorphic operators.

Re:Strong Types and Their Impact on Testing by tikhonj on Tuesday November 18, 2014 @05:01PM (#8626650)
Haskell doesn't do numeric conversion, it just allows numeric literals to have any valid numeric type.

If you tried it with variables you would get a type error:

    > let x = 1.0 :: Double
    > let y = 1 :: Int
    x + y
    <interactive>:10:5:
      Couldn't match expected type ‘Double’ with actual type ‘Int’
      In the second argument of ‘(+)’, namely ‘y’
      In the expression: x + y
It sometimes looks like conversion because the literal `1` is polymorphic and can have a more specific type like `Int` or `Double` inferred from context.
Re:Strong Types and Their Impact on Testing by djur on Tuesday November 18, 2014 @08:53PM (#8627750)
Ah, thanks for the correction.
Re:Strong Types and Their Impact on Testing by michaelochurch on Tuesday November 18, 2014 @09:24PM (#8627866)
(Different poster.) In fact, one of the beautiful things about Haskell is that the type system can (usually) infer exactly as much specificity as is needed.

    λ> :t 5
    5 :: Num a => a
    λ> :t 5.6
    5.6 :: Fractional a => a
    λ> :t (5 :: Integer)
    (5 :: Integer) :: Integer
The type of the literal "Num a => a" means that the literal "5" works for any type in the Num typeclass. So you can mix literals with any numeric type because the compiler will correctly infer the right type. You can even get usages like this:

    λ> :t (\x -> x + 5)
    (\x -> x + 5) :: Num a => a -> a
    λ> let f = (\x -> x + 5) in (f (0 :: Int), f (0 :: Double))
    (5,5.0)
Re:Strong Types and Their Impact on Testing by ForHackernews on Wednesday November 19, 2014 @08:55PM (#8633974)
> True being coercible to a number is unfortunate

If we want to be really pedantic, in Python 2.X, True isn't coercible to an integer, it is an integer.

>>> True == 1 True >>> isinstance(True, int) True

This is an artifact of the fact that when Python was first created, it didn't have boolean types, so when they were added later, "True" and "False" were bolted on as aliases to the integers 1 and 0.

Re:Strong Types and Their Impact on Testing by dllthomas on Tuesday November 18, 2014 @02:25PM (#8625765)
I think it was meant to be C, where it would often (although not always - very much implementation defined) wind up interpreting the bits of the float as if they represented an integer.
Re:Strong Types and Their Impact on Testing by mikeash on Tuesday November 18, 2014 @02:26PM (#8625770)
That's a C example, where it demonstrates my point perfectly. Python doesn't even have a printf function, where did you get the idea it was supposed to be Python?
Re:Strong Types and Their Impact on Testing by masklinn on Tuesday November 18, 2014 @02:59PM (#8625961)
> That's a C example, where it demonstrates my point perfectly.

Yeah I kinda forgot about the result.

> Python doesn't even have a printf function, where did you get the idea it was supposed to be Python?

Nowhere? I never assumed your example was python, I was showing something irrelevant.

Re:Strong Types and Their Impact on Testing by mikeash on Tuesday November 18, 2014 @03:12PM (#8626036)
When you quoted my printf statement and followed it with "which does not demonstrate your point and is valid Python" that kind of implied you thought it a) doesn't demonstrate my point and b) is valid Python.

If that's not what you mean, that was not at all evident.

Re:Strong Types and Their Impact on Testing by masklinn on Tuesday November 18, 2014 @03:35PM (#8626168)
> If that's not what you mean

It's not, I pretty much fell into the issue you decry at the end of your comment: I considered the operation being allowed at all (by the compiler and the runtime) not being evidence of weak typing. Which I guess is technically correct, but is mostly completely irrelevant to the point you were making.

Re:Strong Types and Their Impact on Testing by dllthomas on Tuesday November 18, 2014 @02:27PM (#8625777)
If someone is saying something bad about a language and it has something to do with types being weak, they must be saying it about Python?
Re:Strong Types and Their Impact on Testing by lovelustus on Tuesday November 18, 2014 @12:41PM (#8625083)
Boomtown! This is awesome...