The tag has no wiki summary.

learn more… | top users | synonyms

7
votes
3answers
361 views

Is changing the type of a variable partway through a procedure in a dynamically typed language bad style?

In Python (and occasionally PHP) where variables do not have fixed types, I'll frequently perform 'type transformations' on a variable part-way through my code's logic. I'm not (necessarily) talking ...
5
votes
4answers
1k views

Can a loosely typed language be considered true object oriented?

Can a loosely typed programming language like PHP be really considered object oriented? I mean, the methods don't have returning types and method parameters has no declared type either. Doesn't ...
8
votes
3answers
2k views

Is there a difference between casting and converting types in imperative programming languages?

The question came up in a discussion at StackOverflow. Is there a clean distinction between the two concepts cast and convert (concerning the type of an object), or are these two words describing ...
10
votes
4answers
2k views

Why are weakly-typed languages still being actively developed?

I wonder why are weakly-typed languages still being actively developed. For example, what benefit can one draw from being able to write $someVar = 1; (...) // Some piece of code $someVar = ...
8
votes
4answers
1k views

How does thinking on design patterns and OOP practices change in dynamic and weakly-typed languages?

There is a fairly helpful question already along these lines ("Non-OOP Design Patterns?"), but I am more curious about a transitional point of view for someone just getting started with dynamic and ...
1
vote
4answers
220 views

Syntax extension in weakly typed lanuages?

I like languages that give me the ability to extend the syntax of the language. At the same time, all the languages that I know will let me extend the syntax have relatively heavy type systems. Are ...
14
votes
5answers
4k views

What arguments are there in favor of weak typing?

This came up in a discussion with a friend, and I found myself hard-pressed to think up an any good arguments. What benefits do weak typing confer?
16
votes
9answers
18k views

Type Casting variables in PHP: Is there a practical example?

PHP, as most of us know, has weak typing. For those who don't, PHP.net says: PHP does not require (or support) explicit type definition in variable declaration; a variable's type is determined ...