Preview

Programming Language and Effects

Good Essays
Open Document
Open Document
351 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Programming Language and Effects
In computer science , a function or expression is said to have a side effect if, in addition to returning a value, it also modifies some state or has an observable interaction withcalling functions or the outside world. For example, a function might modify a global or static variable , modify one of its arguments, raise an exception, write data to a display or file, read data, orcall other side-effecting functions. In the presence of side effects, a program's behavior depends on history; that is, the order ofevaluation matters. Understanding and debugging a function with side effects requires knowledge about the context and its possible histories. [1] [2]
Side effects are the most common way that a program interacts with the outside world (people, filesystems, other computers on networks). But the degree to which side effects are used depends on the programming paradigm. Imperative programming isknown for its frequent utilization of side effects. In functional programming , side effects are rarely used. Functional languages such as Standard ML , Scheme and Scala do not restrict side effects, but it is customary for programmers to avoid them. [3] The functional language Haskell restricts side effects with a static type system ; it uses the concept of monads to do stateful and IO computations. [4] [5]
Assembly language programmers must be aware of hidden side effects — instructions that modify parts of the processor state which are not mentioned in the instruction's mnemonic. A classic example of a hiddenside effect is an arithmetic instruction which explicitly modifies a register (an overt effect) and implicitly modifies condition codes (ahidden side effect). One defect of an instruction set with many hidden side effects is that, if many instructions have side effects on a single piece of state, like condition codes, then the logic required to update that state sequentially may become aperformance bottleneck. The problem is particularly acute on processors designed

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Structured Query Language (SQL) is a standard database computer language used for querying, modifying and managing data in Relational Database Management Systems (RDBMS). SQL was developed in the 1970's by IBM to initially manipulate and retrieve data in IBM System R. The SQL language was standardized in 1986 by the American National Standards Institute (ANSI); however, later releases were released as International Organization for Standardization (ISO) standards.…

    • 612 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    1.) There have been several versions of SQL created in the last 26 years. In 1986, SQL-86 (SQL-87) was first published. In 1989, SQL-89 was a minor revision made to the original SQL. In 1992, SQL-92 (SQL2) was a major revision to its previous version. In 1999, SQL-99 (SQL3) added regular expression matching, recursive queries, triggers, non scalar types and some object oriented features. In 2003, SQL-2003 introduced XML related features, standardized sequences, and columns with auto generated values. In 2006, SQL-2006 defined ways in which SQL can be used in conjunction with XML and it defined ways of importing and storing XML data in an SQL database, manipulating it within the database and publishing both XML and conventional SQL-data in XML form. It also enables applications to integrate into their SQL code the use of XQuery. In 2008, SQL-2008 Legalized ORDER BY outside cursor definitions, added INSTEAD OF triggers, and added the TRUNCATE statement. As of March 2012, the newest SQL was released its new features include AlwaysOn SQL Server Failover Cluster Instances and Availability Groups which provides a set of options to improve database availability, Contained Databases which simplify the moving of databases between instances, new and modified Dynamic Management Views and Functions, programmability enhancements including new Spatial features, Metadata discovery, Sequence objects and the THROW statement, performance enhancements such as ColumnStore Indexes as well as improvements to OnLine and Partition level operations and security enhancements including Provisioning During Setup, new permissions, improved role management and default schema assignment for groups…

    • 701 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Lab 3 Student

    • 1264 Words
    • 7 Pages

    This lab accompanies Chapter 2 (pp. 56-68) of Starting Out with Programming Logic & Design.…

    • 1264 Words
    • 7 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Using Global Variables

    • 252 Words
    • 2 Pages

    It makes a program hard to understand since it can be modified and have to be aware of all other parts of the program that access it…

    • 252 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    The second category of fault changes individual instructions in the text segment. These faults are intended to approximate the assembly-level manifestation of real C-level programming…

    • 285 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Garbage Collector in C#: Runtime has a Garbage Collector Which cleans the objects that are not in use.…

    • 485 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Dual Language Programs

    • 2132 Words
    • 9 Pages

    Due to high mobility, rapid change, economic growth, and other factors, increasing deculturation has become a current global issue that has begun to affect education (Cornish, 2005). Deculturation usually occurs when a person moves to a country where people speak a language and have a culture they do not understand or are familiar with. Cornish (2005) also states that today individuals do not have to move to another country to experience deculturation, they are able to experience deculturation when people of other cultures immigrate and their culture takes over part or much of their culture. Because this has become such an impact on the United States of America, our educational system has also had to make modifications in order to serve students of diverse cultural backgrounds. In March of 2007, the Census Bureau gathered data from a survey where it was evident that Hispanic immigrants are the largest group of immigrants into the United States. The table below shows that 48.3% of immigrants that enter the United States are Hispanic.…

    • 2132 Words
    • 9 Pages
    Powerful Essays
  • Satisfactory Essays

    Intro to Computers

    • 340 Words
    • 2 Pages

    Most computer software falls into one of three categories: compilers and other translator programs, software applications, and system software. Describe and give examples of each. [RQ, no. 2]…

    • 340 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    educated them and if they do not, you just presented. Using strong language is a tool to…

    • 251 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Entity Relationship Diagram

    • 3067 Words
    • 13 Pages

    –Operator precedence rules? –Operator associativity rules? –Order of operand evaluation? –Operand evaluation side effects? –Operator overloading? –Type mixing in expressions?…

    • 3067 Words
    • 13 Pages
    Powerful Essays
  • Powerful Essays

    Software for early computers was primarily written in assembly language. Higher Level languages were not invented until the benefits of being able to reuse software on different kinds of CPUs started to become significantly greater than the cost of writing a compiler.…

    • 16769 Words
    • 68 Pages
    Powerful Essays
  • Good Essays

    The terms "first generation" and "second generation" programming language were not used prior to the coining of the term "third-generation"; none of these three terms are mentioned in early compendiums of programming languages. The introduction of a third generation of computer technology coincided with the creation of a new generation of programming languages. The marketing for this generational shift in machines correlated with several important changes in what were called high level programming languages, discussed below, giving technical content to the second/third-generation distinction among high level programming languages as well, and reflexively renaming machine codelanguages as first generation, and assembly languages as second generation. A third-generation programming language (3GL) is a generational way to categorize high-level computer programming languages.[1] Where assembly languages, categorized as second generation programming languages, are machine-dependent, 3GLs are much more machine independent and more programmer-friendly. This includes features like improved support for aggregate data types, and expressing concepts in a way that favors the programmer, not the computer. A third generation language improves over a second generation language by having the computer take care of non-essential details. 3GLs feature more abstraction than previous generations of languages, and thus can be considered higher level languages than their first and second generation counterparts.…

    • 887 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Global Variables

    • 648 Words
    • 2 Pages

    This writing assignment will focus on global variables. A global variable is a variable every module in a program can see, meaning that the entire program is its scope (Gaddis, 2010). There are both advantages and disadvantages to using global variables and it is my intention to explore some of them here, starting with the disadvantages.…

    • 648 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Faith Integration

    • 613 Words
    • 3 Pages

    The processor could keep track of what locations are associated with each process and limit access to locations that are outside of a program's extent. By using base and limits registers and by performing a check for every memory access, information regarding the extent of a program's memory could be maintained…

    • 613 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Language features that are used properly may benefit the programmer Language features that are used improperly may waste large amounts of computer time or lead the programmer into timeconsuming logical errors.…

    • 5315 Words
    • 22 Pages
    Satisfactory Essays

Related Topics