Tag Info

Hot answers tagged

33

I would argue that a scripter is a programmer, scripting languages are still programming languages :). Some will argue that you're only a programmer once you've picked up your first non-scripting language. Your Mileage May Vary comes to mind here. Some will also argue that a scripter has no formal methodology/training behind them, in that case those ...


28

This technique can be used to implement core logic that is easily portable between different language environments. For example, I have a calculator simulator where all the internal calculator logic is implemented in 100% JavaScript. The user interface code is of course different for each platform: Web browser (JavaScript) iOS (Objective-C) Windows (C++ ...


26

Simple : Lua have more "niche" objectives than Python. Python is thought to be useful as a general programming language. So, it's useful in a lot of cases. It covers many well known types of application but doesn't enter directly into competition with other languages that might be targeted at specific constraints, but the simplicity of it's syntax. Lua is ...


25

I disagree. First, scripting languages are at a higher level of abstraction, and there is nothing wrong with this. At the beginning one is just trying to learn the principles. Actually I would say that choosing a lower level language may encourage bad coding, since one has to deal with some details before being able to understand them. Instead with a simpler ...


20

It doesn't matter where you start. It matters where you go after you start. BASIC may not be the most elegant language on the planet, but it encompasses the fundamentals of procedural programming, and that's enough to get started. I started with BASIC. I didn't stay there.


18

Very broadly there are two situations where you would apply this pattern: This is used internally to leverage some quality of the embedded language. This is used to provide external programmability. Internally Typically the embedded language is interpreted which allows changes to be made and tested quickly without a re-compile. The embedded language ...


16

What you need to write is called a language specification. It should contain a description of the language's grammar (preferably in Extended Backus-Naur-Form) and its semantics. For the latter part you could either write a description in your own words (but take care to be precise) or a formal semantics.


15

Since it's highly unlikely that another language will find broad adoption, your best bet would be to create a statically typed version of JavaScript (i.e. a language close to java) and a preprocessor that converts that to normal JavaScript. For example, your script looks like that: <script type="text/staticjavascript"> String foobar(int foo, ...


14

bash has been around since 1989, and its syntax is largely compatible with that of the much older Bourne shell, which was released in 1977. Huge swaths of core functionality in many operating systems (most Linux distros, OS X, and indeed most POSIX-compatible operating systems), and many real-world systems (make systems, automated tests, initialization ...


13

Generally the difference is that a "scripter" is writing scripts as part of some other process (IE, for batch processing, or for running backups), whereas a programmer is actually writing a complete application of some sort. The language is really irrelevant. The scripter is just writing "quick and dirty" scripts in order to get a job done, whereas a ...


13

A $ sign in variable name is a special case of "Sigil", Back in the early days of BASIC (1964 or so) $ was used to denote string variable names. My guess is, since it makes it easier on compilers to separate variable names from the rest of the grammar using some symbol, and since it was common to BASIC, its usage has progressed. However, this is not the ...


13

It's not just a bad idea. It's pretty much impossible. How do you implement IO with a language whose IO facilities depend entirely on the host operating system? How could you implement primitive scheduling without any useful interrupt primitives? How could you write a device driver in a language which cannot address a particular byte? Edit:-- Just to ...


12

Consts are good for just giving descriptive variable names to avoid the magic number problems, but they cause a similarly annoying problem of not being able to identify the value actually being used when the const is defined away from it's use. My suggestion, in all languages: define consts in as close a scope as possible to their actual usage. If used in ...


12

It depends on what code is in the include file. Did you try putting the #include for <stdio.h> inside main()? Depending on how the standard library is implemented on your system it may not even compile. Header files can contain not only function declarations, but function definitions. Standard C doesn't support nested functions. If your header file ...


11

Python. Period. Google has very good introductory lectures. EDIT Why? Because Python is: Easy to understand for beginners Scalable (can be used for developing small AND large project) Portable Cross-Platform Object-Oriented Simple FUN


11

You will need the following: A reason for creating a new language A Philosophy A Semantic Definition A lexical description of your tokens A Syntax Analysis definition How will your language be different? What is its mission? Is it functional? Is it object orientated? Is it a meta-language? What are its unique features? What will it give the world ...


11

The fact that you are dealing with a custom scripting language is irrelevant. You are migrating a set of scripts from one language to another. There are 2 basic strategies: 1) Take an on large effort to convert all the scripts upfront (as a project) 2) As you need to make changes to particular scripts, rewrite them in the new language. After some time, ...


11

C programmers, on the whole, will expect the #include directives to be at the beginning of the file. Why risk confusing them without any significant benefit?


10

Your understanding is correct, if you're from the past. You're pretty much describe as it looked like in 1990s. Yes, many languages can be executed directly by a web server plugin. Right on for PHP, mod_php for Apache is still the most popular way to host it. However, high-traffic sites use more modern approach, using web server only as a proxy for FastCGI ...


9

Ousterhout's article1 about scripting languages suggests that the higher level the programming takes place, the more productive the programmer is. If we take that, as Boehm says2, the number of lines a programmer can write in a given time is constant and not dependent on the language or its type (low level, system programming, scripting), one can easily ...


9

In most cases, behind a successful language is a powerful sponsor. AT&T gave us C and C++, Microsoft created the .NET family, Java came from Sun, and even though they didn't invent it, Apple is almost completely responsible for the recent popularity of Objective-C. (Though that's a borderline case, since pretty much nobody outside the OSX/iOS ecosystem ...


9

Real world examples would include:- Most web browsers which will support embedded JavaScript. Microsoft Office Suite -- Excel Word etc. all support embedded VBA scripts. Many network routers include script APIs, in a variety of languages TCL, Perl , Lua. Many embedded devices are implemented using a very small set of core C functions which are glued ...


8

Even when your granny set up your DVD recorder to save a TV show from channel A, starting at X, ending at Y, she programs. But does it make your granny a programmer? No. As anyone who managed to attach two pipes doesn't become a plumber on this basis. Programming can be understood both as activity and as a profession. We've already seen that even your ...


8

My question is, would it be technically possible to have a statically-typed alternative to JavaScript for client-side web page augmentation etc.? Sure. The Google Web Toolkit compiles statically-typed Java to JavaScript... Just think of it: all the beauty and flexibility of Java, with all the performance of machine-generated JavaScript! Seriously ...


8

There is no technical standard that defines a scripting language. It's just a word that is defined by common usage, and like any other word in common usage, there is no guarantee that all the usages are consistent. Tackling your specific questions: The dynamic code generation they are talking about is machine code. In a classic interpreted language (think ...


8

Your friends are being lazy and IMO unprofessional - the world will soon pass them by. Daily builds were meant for projects following Agile practices. It does not work for the waterfall model. I don't have a definitive reference handy, but daily builds were common at least as far back in the 90's, so they pre-date Agile, and the *Unified Process ...


8

Sounds like support engineer to me. Granted you're an internal corporate developer getting tossed halfway between IT tasks and projects, but using code as your go-to tool for solving problems makes your job one as a programmer/developer/engineer regardless of everything else. I would call it support engineer or even something like internal professional ...


7

99.9% of the time creating a new language is completely unnecessary. The return on investment would most likely be tiny, and you would have just wasted your time. Most likely you can use Javascript as a susceptible scripting language, and there are parsers available for most languages already. You can also use other scripting languages you like if you can ...


7

Imagine being in a software house. Imagine having one programmer and one scripter. The boss asks some software to be done. Can the scripter get the job done? Most likely. Can the scripter write readable and maintenable code? Almost impossible. Can the scripter apply the right paradigms, design patterns and choose the right architecture, frameworks, etc? ...


7

You could use an application to draw mockups instead of writing code. Like Balsamiq Mockups or equivalent. Using Mockups feels like drawing, but because it’s digital, you can tweak and rearrange easily. Teams can come up with a design and iterate over it in real-time in the course of a meeting.



Only top voted, non community-wiki answers of a minimum length are eligible