Search Results

Search found 7380 results on 296 pages for 'scripting languages'.

Page 142/296 | < Previous Page | 138 139 140 141 142 143 144 145 146 147 148 149  | Next Page >

  • Doesn't installing "All locales" install necessary fonts too?

    - by its_me
    I recently noticed that my browsers rendered blank text (or invisible text?) on some websites in foreign languages, like Chinese. inside.com.tw, for example. Later I learnt that by default Debian only installs one locale (the one you choose during the installation process), and others need to be installed manually. So, I ran the command: # dpkg-reconfigure locales And selected All locales from the options screen that followed, and proceeded with the rest of the process, which also includes changing the default locale (which I set to en_US.UTF-8). Then I restarted my system. I still can't read the website that I mentioned earlier (inside.com.tw). Most of the text is blank, i.e. invisible. With the page translated by Chrome to my default language (en_US), the text is visible; BUT not in the original language. Why is this happening? Does this mean that installing locales isn't actually necessary, and all I have to do is install the fonts for all supported languages? If so, how do I install all the fonts necessary for All locales? UPDATE: An easy fix is to install the unifont package which adds support for all Unicode 5.1 characters. But the rendering is of very bad quality. So, how I install all font packages? I notice that there are three sets, ones starting with fonts-*, another with xfonts-*, and ttf-*? Which set should I exactly go with, and how do I install that set of fonts. Looking for a knowledgeable solution.

    Read the article

  • avr-gcc 4.7 on ubuntu 12.04

    - by birky
    Please how can I install avr-gcc version 4.7 on ubuntu 12.04? :~$ avr-gcc -v Using built-in specs. COLLECT_GCC=avr-gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/avr/4.5.3/lto-wrapper Target: avr Configured with: ../src/configure -v --enable-languages=c,c++ --prefix=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-libssp --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=avr Thread model: single gcc version 4.5.3 (GCC) :~$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

    Read the article

  • Why does void in C mean not void?

    - by Naftuli Tzvi Kay
    In strongly-typed languages like Java and C#, void (or Void) as a return type for a method seem to mean: This method doesn't return anything. Nothing. No return. You will not receive anything from this method. What's really strange is that in C, void as a return type or even as a method parameter type means: It could really be anything. You'd have to read the source code to find out. Good luck. If it's a pointer, you should really know what you're doing. Consider the following examples in C: void describe(void *thing) { Object *obj = thing; printf("%s.\n", obj->description); } void *move(void *location, Direction direction) { void *next = NULL; // logic! return next; } Obviously, the second method returns a pointer, which by definition could be anything. Since C is older than Java and C#, why did these languages adopt void as meaning "nothing" while C used it as "nothing or anything (when a pointer)"?

    Read the article

  • Are programmers getting lazier and less competent

    - by Skeith
    I started programming in C++ at uni and loved it. In the next term we changed to VB6 and I hated it. I could not tell what was going on, you drag a button to a form and the ide writes the code for you. While I hated the way VB functioned I cannot argue that it was faster and easier than doing the same thing in C++ so i can see why it is a popular language. Now I am not calling VB developers lazy in just saying it easier than C++ and I have noticed that a lot of newer languages are following this trend such a C#. This leads me to think that as more business want quick results more people will program like this and sooner or later there will be no such thing as what we call programming now. Future programmers will tell the computer what they want and the compiler will write the program for them like in star trek. Is this just an under informed opinion of a junior programmer or are programmers getting lazier and less competent in general? EDIT: A lot of answers say why re invent the wheel and I agree with this but when there are wheels available people are not bothering to learn how to make the wheel. I can google how to do pretty much anything in any language and half the languages do so much for you when it come to debugging they have no idea what there code does of how to fix the error. That's how I cam up with the theory that programmers are becoming lazier and less competent as no one cares how stuff works just that it does until it does not.

    Read the article

  • Developing professionally for both iOS, Android, web - an insight

    - by Scott Roberts
    This is not really a question on how to develop for both, I know various cross platform ways and so on. But I more want to know from developer standpoint how hard it is to basically develop iOS, Android and web apps? I am currently in my first job as a mobile/web developer. I have already developed my first iPhone/iPad app and now I have to develop the app for android because the web version I tried just didn't perform as well as needed and web databases just did not seem to make the cut. But I am not sure it's possible to be good at developing all 3 in terms of remembering all the api's etc. I wouldn't say I have an issue with the programming languages just how to use the api's for the various platforms. Also, all the other languages I look at, in my spare time, just feel like I am spreading myself to thin. Is it feasible for one person to be developing ios, android and web apps? Should I think about reducing it to iOS and web based apps? I develop everything by myself, so I have no one to discuss what the best solutions are for everything and I am just trying to workout as I go along. So any cross platform developers out there? Do companies have different teams for different platforms? Any insight would just help me get my head together. Hopefully this question makes sense.

    Read the article

  • Architecture Standards &ndash; BPMN vs. BPEL for Business Process Management

    - by pat.shepherd
    I get asked often which business process standard an organization should use; BPMN or BPEL?  As I explain to folks, they both have strengths.  Here is a great article that helps understand the benefits of both and where to use them.  The good news is that, with Oracle SOA Suite and BPM suite, you have the option and flexibility to use both in the same SCA model and runtime container.  Good stuff. Here is the great article that Mark Nelson wrote: The right tool for the right job BPEL and BPMN are both ‘languages’ or ‘notations’ for describing and executing business processes. Both are open standards. Most business process engines will support one or the other of these languages. Oracle however has chosen to support both and treat them as equals. This means that you have the freedom to choose which language to use on a process by process basis. And you can freely mix and match, even within a single composite. (A composite is the deployment unit in an SCA environment.) So why support both? Well it turns out that BPEL is really well suited to modeling some kinds of processes and BPMN is really well suited to modeling other kinds of processes. Of course there is a pretty significant overlap where either will do a great job What BPM adds to SOA Suite | RedStack

    Read the article

  • Google Programmers

    - by seth
    As a soon-to-be software engineer, I have studied some languages during my time in college. I can name C, C++, Java, Scheme, Ruby, PHP, for example. However, one of the main principles in my college (recognized by many as the best in my country) is to teach us how to learn for ourselves and how to search the web when we have a doubt. This leads to a proactive attitude, when I need something, I go get it and this has worked so far for me. Recently, I started wondering though, how much development would I be able to do without internet access. The answer bugged me quite a bit. I know the concept of the languages, mostly I know what to do, but I was amazed by how "slow" things were without having the google to help in the development. The problem was mostly related to specific syntax but it was not without some effort that i solved some of the SPOJ problems in C++. Is this normal? Should I be worried and try to change something in my programming behaviour? UPDATE: I'll give a concrete example. Reading and writing to a file in java. I have done this about a dozen times in my life, yet every time I need to do it, I end up googling "read file java" and refreshing my memory. I completely understand the code, i fully understand what it does. But I am sure, that without google, it would take me a few tries to read and write correctly (if I had to sit in front of the screen with a blank page and write this without consulting any source whatsoever).

    Read the article

  • How to popularize Nemerle (or another programming language)?

    - by keykeeper
    Any .NET developer who is interested in different programming languages knows that F# is the most popular functional language for the .NET platform nowadays. The only fact describing the popularity of F# is the great support of Microsoft. But we are not limited with F# at all. There are some other functional languages on the .NET platform. I'm very disappointed with the fact that Nemerle isn't well-known. It's an awesome language which supports three paradigms: object-oriented, functional and meta- programming. I won't try to explain why I like it so much. The problem is that I can't use it at work. I think that only really brave companies can rely on Nemerle. It's almost unknown, that's why it's hard to find new developers for the project. Noone wants to make a first step with Nemerle if it can influence the budget what is reasonable. So, here is a question: what can I do to make Nemerle more popular? Here are my first ideas: implement open-source projects using Nemerle; make presentations on different conferences; write articles.

    Read the article

  • How do you set up the directory structure for a multilingual site without duplicating content?

    - by Ricardo
    I want to make a website in two languages. I've looked around and settled on the directory option of separating both languages. How do I make it work? Let's say I have the following three files for the landing homepage, the English page and the Spanish page: http://www.domain.com/index.html http://www.domain.com/en/index.html http://www.domain.com/es/index.html Let's also say that /index.html will be in English, with a link to /es/index.html. In turn, /es/index.html will have a link to the English version. Would this be back to /index.html or to /en/index.html. How do I get both English versions (the one at the root and the one in the directory) to actually be the same file in the same directory? I'm new to this, so I'm not using any scripts yet. To me, the obvious solution is to duplicate both English versions and have the one at the root point to files under the /en/ directory, but I'm not a fan of duplication and I've learned that search engines really frown upon that. Anyone point me in the right direction?

    Read the article

  • Java SE 6 Update 23 is released!

    - by [email protected]
    Java SE 6 Update 23 includes the following key changes: Java VisualVM 1.3.1 introduces the following features and enhancements:           o Added Java version and vendor information to the application Overview view           o Built on NetBeans Platform and profiler 6.9.1 Swing JMenuItem Corrections for right-to-left languages           o Non-default alignment and text orientation for the menu items in Swing have been fixed           o The position of the icon and the text where text used to overlap the icon in a menu item was corrected           o All platform Look and Feel configurations will now handle menu items in right-to-left language situations. Updated HotSpot 19 JVM Engine with improvements to overall performance and reliability. Additional Languages support in SuSE Linux Enterprise Server 10 and 11 on Chinese(Simplified), Chinese (Traditional), Japanese, and Korean locales. Supported system configuration, check - http://java.sun.com/javase/6/webnotes/install/system-configurations.htmlSee Release Notes for additional details.

    Read the article

  • Apress "Pro DLR in .NET 4' - ISBN 978-1-430203066-3 - Initial comments

    - by TATWORTH
    The dynamic language runtime (DLR) is a radical development of Dot Net. In some ways it is like the Laser was 40 years, a solution looking for a problem. At the moment the DLR supports languages such as Iron Ruby and Iron Python, together with dynamic extensions for C# and VB.NET. Where DLR will also score is the ability to write your own Dot Net language for specialist areas. So how does this book fare in introducing the DLR? It is a book that will require careful study and perhaps reading several times before fully understanding the subject. You will need to spend time trying out the sample code. So who would I recommend this book to? I recommend it to C# development teams for their library. I recommend it to individuals who not only know C# but have a good history of learning other computer languages. It is not a book that can just be "dipped into", but will require one or more reads from start to finish. This is no reflection on the skill of the author but of the newness of the material.

    Read the article

  • What follows after lexical analysis?

    - by madflame991
    I'm working on a toy compiler (for some simple language like PL/0) and I have my lexer up and running. At this point I should start working on building the parse tree, but before I start I was wondering: How much information can one gather from just the string of tokens? Here's what I gathered so far: One can already do syntax highlighting having only the list of tokens. Numbers and operators get coloured accordingly and keywords also. Autoformatting (indenting) should also be possible. How? Specify for each token type how many white spaces or new line characters should follow it. Also when you print tokens modify an alignment variable (when the code printer reads "{" increment the alignment variable by 1, and decrement by 1 for "}". Whenever it starts printing on a new line the code printer will align according to this alignment variable) In languages without nested subroutines one can get a complete list of subroutines and their signature. How? Just read what follows after the "procedure" or "function" keyword until you hit the first ")" (this should work fine in a Pascal language with no nested subroutines) In languages like Pascal you can even determine local variables and their types, as they are declared in a special place (ok, you can't handle initialization as well, but you can parse sequences like: "var a, b, c: integer") Detection of recursive functions may also be possible, or even a graph representation of which subroutine calls who. If one can identify the body of a function then one can also search if there are any mentions of other function's names. Gathering statistics about the code, like number of lines, instructions, subroutines EDIT: I clarified why I think some processes are possible. As I read comments and responses I realise that the answer depends very much on the language that I'm parsing.

    Read the article

  • Working Abroad Advice Needed

    - by RBA
    Hi, First of all, Happy New Year everybody! I wish you for 2011 all the best! For several years I was thinking about to work abroad, and I want to make this step(to work in a/several foreign countries, for several years). I am a Software Developer with a Bachelor of Engineering in Computer Science, with a +4 years of experience in Delphi(and small working experience in other programming languages). Until now I've applied at aprox. 100 positions over the world, and I've been contacted by 4-5 hiring managers. Our technical discussions went good, but then we reached at working visa 'problem'. I don't have legal/health problems, but I don't poses a working permit in other countries except Romania. I've been reading several forums concerning the working visas (here I take out working visa for US or other 'hard to get visa' countries), and there are several steps which companies must do (so I can take out the bureaucracy problem) to make the papers. Concerning the cost of a visa, this goes up to one medium salary from that country(in most of the cases). I've been working for the last years with different clients, from a wide variety of countries, and I don't believe I will have problems with integration in a foreign country So, the problem is that the market don't need Delphi Developers (there is a small amount of open positions on the recruiting sites), and I should start learning other programming language(all the time is better to know other programming languages - but to master it, requires some time) with a higher market 'rank' (Java/C#/etc), OR the problem is only concerning the working visa, and maybe the reticence of the employer to foreign possible candidates? I'm asking this especially for those users who made this step in their life or they want to make it in the future. Best regards,

    Read the article

  • How do you motivate peers to become better developers?

    - by Brian Rasmussen
    In my experience there seems to be two kinds of developers (if we simplify matters a great deal of course). On the one hand we have the developers, who may do a perfectly acceptable job, but who do not really care about the computer science part of their craft. They usually know few languages / technologies and are happy to let things stay that way. For whatever reason, they don't try to improve their computer science skills unless this is required in their current position. On the other hand, we have the geeks or the pragmatic programmers if you subscribe to that idea. They play around with other languages and technologies and usually have knowledge about several topics outside the technical domain of their current job. I would like to see more developers, who are enthusiastic about software development. If you share this point of view, what do you do to push your peers in that direction? Edit: follow-up question inspired by one of the answers: As non-managers, should we really care about this? And why/why not?

    Read the article

  • International search: how to show different domains in Google+ Local?

    - by Baumr
    Background A site has multiple ccTLDs: example.com for people in the US, example.co.uk for UK users, example.de for Germany, example.fr for France, etc. Searching for certain city keywords will return a list of Google+ Local (formerly Places): Each links to the corresponding company website that is visible. Problem When searching on www.google.de, the domain of the site intended for US users (example.com) appears instead of the corresponding ccTLD (example.de) aimed at German users. This applies to all languages. In my opinion and for the purposes of this business, it's not good user experience: searchers would most likely prefer to book on a site localized for them (e.g. in their language and currency). Question Is it possible to return different ccTLDs in these local search listings for users across the globe? Currently, Google+ Local seems to only support supports adding a single "Website" field. Solutions I have considered Creating duplicate Google Places listings for each URL would be spammy (and not viable when there's 100s of locations, each needing a listing in 8 languages). I don't see the hreflang annotation helping either, and GWMT geotargeting is already set.

    Read the article

  • What's cool about Lisp nowadays? [closed]

    - by Kos
    Possible Duplicates: Why is Lisp useful? Is LISP still useful in today's world? Which version is most used? First of all, let me clarify: I'm aware of Lisp's place in history, as well as in education. I'm asking about its place in practical application, as of 2011. The question is: What features of Lisp make it the preferred choice for projects today? It's widely used in various AI areas as far as I know, and probably also elsewhere. I can imagine projects choosing, for instance... Python because of its concise, readable syntax and it being dynamic, Haskell for being pure functional with a powerful type system, Matlab/Octave for the focus on numerics and big standard libraries, Etc. When should I consider Lisp the proper language for a given problem? What language features make it the preferred choice then? Is its "purity and generality" an advantage which makes it a better choice for some subset of projects than the modern languages? edit- On your demand, a little rephrase (or simply a tl;dr) to make this more specific: a) What problems are solvable with Lisp much more easily than with more common, modern languages like Python or C# (or even F# or Scala)? b) What language features specific for Lisp make it the best choice for those problems?

    Read the article

  • Novice prototyping a massive multiplayer webpage based gaming system

    - by Sean Hendlin
    I'm trying to build a website based game in which various pages of the site act as different areas of the game. I am wondering what you would recommended as a design structure. Which languages would be best if building what will hopefully becomes a massive system able to scale to massive amounts of users. I am wondering if and how various elements from differing languages could be meshed to interact with each other. For example could I use html5, javascript, and PHP? What about asp.net how might that factor in? I'm a newbie programmer but I've been working on this idea for years and I want to build it to reality. Your comments and suggestions are appreciated. P.S.: The game is not all graphics and animation (though flash like appearance and some animation would be nice). What I am thinking of is essentially a heavily gamified system of forms. And LOTS of data in many different categories cross referencing each-other. I'm not sure how to go about structuring the collection of data. Also while I know javascript can be used to process some functions, I'm wondering what sort of base system I would need to handle the server side processing of what I am expecting to be some pretty significant algorithm processing. That is to say I expect to have many many many functions and I'm not sure how to mange this using javascript. I feel like they would be forgotten, mixed up, disorganizes as they essentially only exist where they are coded. I guess I need to learn something of libraries? OK, Thank you! Is enough from me for now.

    Read the article

  • The NEW MySQL for Developers Course

    - by Antoinette O'Sullivan
    Just Released - The new MySQL for Developers training course.  This 5 day course covers everything a developer needs to know when planning, designing and implementing applications using MySQL, with realistic examples using languages such as Java and PHP. This course gives an in-depth coverage of statements that access and modify data, and shows the student how to design and create other MySQL objects such as triggers, views, and stored procedures. You can take this course: From your desk as a live virtual offering. There are over 800 events on the schedule so you should find one in a timezone near you. The virtual events are also delivered in many languages including English, German, Korean, Latin American Spanish, ... In a classroom. Here is a sample of events on the schedule:  Location  Date  Delivery Language  Prague, Czech Republic 8 October 2012 Czech  Warsaw, Poland 5 November 2012 Polish  Wien, Austria  12 November 2012 German  London, England 15 October 2012 English  Bern, Switzerland  11 April 2013 German  Zurich, Switzerland 14 November 2012 German  Milan, Italy 19 November 2012  Italian  Rome, Italy  15 October 2012  Italian  Gummersbach, Germany  11 February 2013 German  Hamburg, Germany  12 November 2012  German Munich, Germany  10 June 2013  German  Lisbon, Portugal 26 November 2012 European Portuguese  Porto, Portugal 18 February 2013 European Portuguese  Nairobi, Kenya  19 November 2012  English  Madrid, Spain  10 December 2012  Spanish Petaling Jaya, Malaysia  15 October 2012  English  Bangkok, Thailand  29 October 2012  English For further information on the Authentic MySQL Curriculum, to register for an event or express interest in an additional event, go to http://oracle.com/education/mysql.

    Read the article

  • Should the syntax for disabling code differ from that of normal comments?

    - by deltreme
    For several reasons during development I sometimes comment out code. As I am chaotic and sometimes in a hurry, some of these make it to source control. I also use comments to clarify blocks of code. For instance: MyClass MyFunction() { (...) // return null; // TODO: dummy for now return obj; } Even though it "works" and alot of people do it this way, it annoys me that you cannot automatically distinguish commented-out code from "real" comments that clarify code: it adds noise when trying to read code you cannot search for commented-out code for for instance an on-commit hook in source control. Some languages support multiple single-line comment styles - for instance in PHP you can either use // or # for a single-line comment - and developers can agree on using one of these for commented-out code: # return null; // TODO: dummy for now return obj; Other languages - like C# which I am using today - have one style for single-line comments (right? I wish I was wrong). I have also seen examples of "commenting-out" code using compiler directives, which is great for large blocks of code, but a bit overkill for single lines as two new lines are required for the directive: #if compile_commented_out return null; // TODO: dummy for now #endif return obj; So as commenting-out code happens in every(?) language, shouldn't "disabled code" get its own syntax in language specifications? Are the pro's (separation of comments / disabled code, editors / source control acting on them) good enough and the cons ("shouldn't do commenting-out anyway", not a functional part of a language, potential IDE lag (thanks Thomas)) worth sacrificing? Edit I realise the example I used is silly; the dummy code could easily be removed as it is replaced by the actual code.

    Read the article

  • Should we choose Java over C# or we should consider using Mono?

    - by A. Karimi
    We are a small team of independent developers with an average experience of 7 years in C#/.NET platform. We almost work on small to average web application projects that allows us to choose our favorite platform. I believe that our current platform (C#/.NET) allows us to be more productive than if we were working in Java but what makes me think about choosing Java over C# is the costs and the community (of the open source). Our projects allow us even work with various frameworks as well as various platforms. For example we can even use Nancy. So we are able to decrease the costs by using Mono which can be deployed on Linux servers. But I'm looking for a complete ecosystem (IDE/Platform/Production Environment) that decreases our costs and makes us feel completely supported by the community. As an example of issues I've experienced with MonoDevelop, I can refer to the poor support of the Razor syntax on MonoDevelop. As another example, We are using "VS 2012 Express for Web" as our IDE to decrease the costs but as you know it doesn't support plugins and I have serious problems with XML comments (I missed GhostDoc). We strongly believe in strongly-typed programming languages so please don't offer the other languages and platforms such as Ruby, PHP, etc. Now I want to choose between: Keep going on C#, buy some products and be hopeful about openness of .NET ecosystem and its open source community. Changing the platform and start using the Java open source ecosystem

    Read the article

  • Country specific content vs global content

    - by Ando
    I have a global product presentation website myproduct.com For certain countries I also own the country domain: myproduct.co.uk, myproduct.com.au, myproduct.es, myproduct.de, etc. The presentation website is translated in multiple languages and I set up redirects: myproduct.es will redirect to myproduct.com/es/, myproduct.de will redirect to myproduct.com/de/, etc. . The content so far is the same, just translated in different languages. The advantages are that it's easy to keep the content aligned - everything is managed from one centralized dashboard (I'm using Wordpress with qtranslate). Now I'm running into trouble as for different countries I want localized content - for UK I want to run different promotions and use a different reseller than for .com.au so I would like that users coming from myproduct.co.uk see something different than those coming from myproduct.com.au (and not be redirected to myproduct.com as they are right now). How can I achieve this? I could duplicate the whole main website and modify only certain parts but then I would have a lot of duplicate content (e.g. info about how the product works) and I would have pages that are likely to change (FAQ page) that I would have to keep updated over all websites. I can duplicate only partially the main website: on the localized website I would have only the pages that are different and then all other links would point to the .com site. This would solve the duplication problem but would cause confusion for the user as you would navigate from .co.uk to .com without noticing and then wonder how to get back. Other, better option?

    Read the article

  • Generic software code style enforcer

    - by FuzziBear
    It seems to me to be a fairly common thing to do, where you have some code that you'd like to automatically run through a code style tool to catch when people break your coding style guide(s). Particularly if you're working on code that has multiple languages (which is becoming more common with web-language-x and javascript), you generally want to apply similar code style guides to both and have them enforced. I've done a bit of research, but I've only been able to find tools to enforce code style guidelines (not necessarily applying the code style, just telling you when you break code style guidelines) for a particular language. It would seem to me a reasonably trivial thing to do by just using current IDE rules for syntax highlighting (so that you don't check style guide rules inside quotes or strings, etc) and a whole lot of regexes to enforce some really generic things. Examples: if ( rather than if( checking lines with only whitespace Are there any tools that do this kind of really generic style checking? I'd prefer it to be easily configurable for different languages (because like it or not, some things would just not work cross language) and to add new "rules" to check new things.

    Read the article

  • Why do we have to use break in switch

    - by trejder
    Who decided, and basing on what concepts, that switch construction (in many languages) has to be, like it is? Why do we have to use break in each statement? Why do we have to write something like this: switch(a) { case 1: result = 'one'; break; case 2: result = 'two'; break; default: result = 'not determined'; break; } I've noticed this construction in PHP and JS, but there are probably many other languages that uses it. If switch is an alternative of if, why we can't use the same construction for switch, as for if? I.e.: switch(a) { case 1: { result = 'one'; } case 2: { result = 'two'; } default: { result = 'not determined'; } } It is said, that break prevents execution of a blocks following current one. But, does someone really run into situation, where there was any need for execution of current block and following ones? I didn't. For me, break is always there. In every block. In every code.

    Read the article

  • What do you wish language designers paid attention to?

    - by Berin Loritsch
    The purpose of this question is not to assemble a laundry list of programming language features that you can't live without, or wish was in your main language of choice. The purpose of this question is to bring to light corners of languge design most language designers might not think about. So, instead of thinking about language feature X, think a little more philisophically. One of my biases, and perhaps it might be controversial, is that the softer side of engineering--the whys and what fors--are many times more important than the more concrete side. For example, Ruby was designed with a stated goal of improving developer happiness. While your opinions may be mixed on whether it delivered or not, the fact that was a goal means that some of the choices in language design were influenced by that philosophy. Please do not post: Syntax flame wars (I could care less whether you use whitespace [Python], keywords [Ruby], or curly braces [Java, C/C++, et. al.] to denote program blocks). That's just an implementation detail. "Any language that doesn't have feature X doesn't deserve to exist" type comments. There is at least one reason for all programming languages to exist--good or bad. Please do post: Philisophical ideas that language designers seem to miss. Technical concepts that seem to be poorly implemented more often than not. Please do provide an example of the pain it causes and if you have any ideas of how you would prefer it to function. Things you wish were in the platform's common library but seldom are. One the same token, things that usually are in a common library that you wish were not. Conceptual features such as built in test/assertion/contract/error handling support that you wish all programming languages would implement properly--and define properly. My hope is that this will be a fun and stimulating topic.

    Read the article

  • How often is seq used in Haskell production code?

    - by Giorgio
    I have some experience writing small tools in Haskell and I find it very intuitive to use, especially for writing filters (using interact) that process their standard input and pipe it to standard output. Recently I tried to use one such filter on a file that was about 10 times larger than usual and I got a Stack space overflow error. After doing some reading (e.g. here and here) I have identified two guidelines to save stack space (experienced Haskellers, please correct me if I write something that is not correct): Avoid recursive function calls that are not tail-recursive (this is valid for all functional languages that support tail-call optimization). Introduce seq to force early evaluation of sub-expressions so that expressions do not grow to large before they are reduced (this is specific to Haskell, or at least to languages using lazy evaluation). After introducing five or six seq calls in my code my tool runs smoothly again (also on the larger data). However, I find the original code was a bit more readable. Since I am not an experienced Haskell programmer I wanted to ask if introducing seq in this way is a common practice, and how often one will normally see seq in Haskell production code. Or are there any techniques that allow to avoid using seq too often and still use little stack space?

    Read the article

< Previous Page | 138 139 140 141 142 143 144 145 146 147 148 149  | Next Page >