dynamic-languages

A dynamic language to learn for curiosity's sake

This is sort of a "best language" question, but hopefully with enough of a twist to make it worthwhile. As someone who only uses C and C#, I'm curious to learn a dynamic language to expand my knowledge. I don't know which to choose. The thing is that my motivation isn't necessarily to create any "real world" projects, or projects that ...

Learning Python for a .NET developer

I have been doing active development in C# for several years now. I primarily build enterprise application and in house frameworks on the .NET stack. I've never had the need to use any other mainstream high level languages besides C# for my tasks, since .NET is the standard platform we use. There are some legacy Python applications th...

Is there a way to plan and diagram an architecture for dynamic scripting languages like groovy or python?

Say I want to write a large application in groovy, and take advantage of closures, categories and other concepts (that I regularly use to separate concerns). Is there a way to diagram or otherwise communicate in a simple way the architecture of some of this stuff? How do you detail (without verbose documentation) the things that a map ...

In what languages can you dynamically rewrite functions on the fly?

I recently had the necessity of rewriting a javascript function in javascript, dynamically. The ease with which I did it, and how fun it was, astounded me. Over here I've got some HTML: <div id="excelExport1234" onclick="if(somestuff) location.href='http://server/excelExport.aspx?id=56789&amp;something=else'; else alert('not imp...

Declarative web-service authorisation & WSDL typing

We currently have a group of web-services exposing interfaces to a variety of different client types and roles. Background: The web-service application code is (and will stay) written in a weakly typed dynamic language. Authentication is handled seperately, this post is about Authorisation. All operations exposed by the web-services ...

Debugging Ruby/Python/Groovy

I'm rephrasing this question because it was either too uninteresting or too incomprehensible. :) The original question came about because I'm making the transation from Java to Groovy, but the example could apply equally when transitioning to any of the higher-level languages (Ruby, Python, Groovy). Java is easy to debug because there ...

Duck typing - what about when you need a concrete type?

Say you are doing a calculator in a dynamic language (Python etc...) and you have an add method. def Add(x, y) print x + y Now if you were to pass in anything but a number that would be wrong, so you need some datatype checking. Is Duck Typing about objects as opposed to parameters like the above example? Could anyone explain fu...

programmatically add property do ActionScript Object (metaprogramming)

I have an AS3 Object: {p1:"..", p2:".."} I want con create another object that contains the first one in a property whose name is defined by a variable: var propertyName:String = "myName"; var myObj = new Object(); myObj.something_that_creates_a_property_named_as_propertyName({p1:"..", p2:".."}) does it make any sense? ...

Can Perl be "statically" parsed?

An article called "Perl cannot be parsed, a formal proof" is doing the rounds. So, does Perl decide the meaning of its parsed code at "run-time" or "compile-time"? In some discussions I've read, I get the impression the arguments stem from imprecise terminology, so please try to define your technical terms in your answer. I have deliber...

Do scripters have to consider roundoff error?

I'm studying C, and the idea of guard digits and rounding errors came up. Do practitioners of scripting languages (I'm thinking of Python and Perl here) need to worry about this stuff? What if they are doing scientific programming? ...

Are Interfaces in JavaScript necessary?

I suppose this could apply to any dynamic language, but the one I'm using is JavaScript. We have a situation where we're writing a couple of controls in JavaScript that need to expose a Send() function which is then called by the page that hosts the JavaScript. We have an array of objects that have this Send function defined so we iterat...

How do you effectively unit test the parameters of dynamic languages?

This answer hit a nerve with me on something I have never understood with how you handle parameter types in dynamic languages vs. a static language (my perspective being informed or deformed - as you prefer) from Java. Given a method foo that takes a parameter bar in a dynamic language, there is no enforcement at compile time of the typ...

Using -performSelector: vs. just calling the method

I'm still kind of new to Objective-C and I'm wondering what is the difference between the following two statements? [object performSelector:@selector(doSomething)]; [object doSomething]; ...

How to create inline objects with properties in Python?

In Javascript it would be: var newObject = { 'propertyName' : 'propertyValue' }; How to do it in Python? ...

How can you tell if a language is a "dynamic language"?

I'm trying to get a better handle on what it really means for a language to be "dynamic". I have quite a bit of experience with Lingo, which is the scripting language for the Adobe (formerly Macromedia) Director product line, and I'm just wondering if it would be considered a "dynamic language". The way variables and lists are handled s...

Why is the "Dynamic" part of Dynamic languages so good?

Jon Skeet posted this blog post, in which he states that he is going to be asking why the dynamic part of languages are so good. So i thought i'd preemptively ask on his behalf: What makes them so good? ...

Domain Driven Design efforts in dynamic languages ?

Are you aware of any DDD efforts in a dynamic language ? Practical resources on DDD tend to decrease quite dramatically when straying from enterprise-oriented solutions (a google search exluding C#, .NET, ASP and Java yields 10 times less results), but i couldn't actually find a single example of a DDD implementation in a dynamic langua...

Dynamic languages Vs Static languages (can this two be together in the same place)

programming languages are grouped it 2 main classes "Dynamic" & "Static". - Is this always the case a programming language is in one of them and not in both, I mean can a language be dynamic and static at the same time ? ...

Writing programs in dynamic languages that go beyond what the specification allows

With the growth of dynamically typed languages, as they give us more flexibility, there is the very likely probability that people will write programs that go beyond what the specification allows. My thinking was influenced by this question, when I read the answer by bobince: http://stackoverflow.com/questions/1777705/a-question-about-j...

Can you have too much of “dynamic” in dynamic languages?

In last few months I have been making a transition from Java to Groovy and I can appreciate many of the benefits it brings: less code, closures, builders, MOP that in the end makes framework like Grails possible, ease with mocking when writing tests etc. However, I have been “accused” by my coworkers that my code is not groovy enough. ...