Was there an attempt to create a programming language aimed for maximal abstraction?

I am trying to understand if a programming language can have totally or almost totally parallel the abstraction level shared between generally all human languages.

A pseudocode of this perhaps “highest programming language” could be the following example.


open (shop) at (06:00);
if no (visitor), than (air condition) == off, else
in plea (air condition) == on

while (opening-day), for each (visitor), since (08:00) until (20:00) accept customers;
Exceptionally, since (12:00) until (13:00) close (shop);
also, if (buying is finished)
give (generally every customer)
the message "thank you for buying with our store and goodbye"
since (20:00) until (08:00) close (shop);


hello is kind of an opening declaration before parsing, styling and behavior take place, quite like a HTML <!DOCTYPE> saying if it starts “not bad” (and maybe if it also starts “good”).
goodbye is like a termination command (such as exit common in CLUI programs)

I have no idea what will such a programming language be might be used for — humanoid robots comes to me in mind though.
Was there an attempt to create a programming language aimed for maximal abstraction?

Are type abstraction values and universal types not for non functions, but only for functions?

In Types and Programming Languages by Pierce, Chapter 23 Universal Types has a summary of System F in the following figure, in particular, “type abstraction values” and their types “universal types”.

In all the examples I have seen so far in the chapter, in particular Section 23.4 Examples, (not sure if I miss any example):

  • all the type abstraction values are parametrically polymorphic functions, by allowing the types of their arguments to have any type, and
  • all the universal types, i.e. the types of type abstraction values, are types of parametrically polymorphic functions.

Are type abstraction values and their universal types not for non functions, but only for functions?

More specifically, in any type abstraction value, say $ \lambda X.t$ , must $ t$ have a function type, not a non-function type?

In Section 23.4 Examples, values of base types and of recursive types are type abstraction values, because their definitions in the section are functions by Church encodings.


enter image description here

Is this lamda abstraction created as a generator of a recursive function?

In Lambda calculus, a recursive function $ f$ is obtained by

$ $ f = Y g $ $

where $ Y$ is the Y combinator and $ g$ is the generator of $ f$ i.e. $ f$ is a fixed point of $ g$ i.e. $ f == g f$ .

In The Scheme Programming Language, I saw an example implementing a recursive function $ f$ that sums the integers in a list:

(let ([sum (lambda (f ls)                   (if (null? ls)                      0                      (+ (car ls) (f f (cdr ls)))))]) (sum sum '(1 2 3 4 5)))  => 15 

What is the mathematical derivation that drives to create the lambda abstraction

 lambda (f ls)      (if (null? ls)          0         (+ (car ls) (f f (cdr ls)))) 

? It looks like a generator of $ f$ , but not entirely.


What time horizon and level of abstraction is the right for the maintainable and evolvable software? [closed]

From time to time I feel exhausted in my software development efforts because I am pressed to think and develop in very specific and very short term manner. One client here and now requires one feature and I should implement it for him. Nor client, nor management of my company are interested in investing some time and effort in investigation how can we make this feature adaptable and more general (e.g. introduce configuration instead of hard coding the one branch of feature) for other clients or for future use.

From the one side this may be bad business decision. From the other side it is certainly bad HR decision. Ancient masters achieved excellence precisely because they made or built their artifacts for for the future, for the generations to come, for the eternity. Maybe software developers can achieve similar mastery and excellency if they are allowed to build software for eternity?

So – are there technical criteria (best practices, industry standards, etc.) for building maintainable and evolvable software, criteria that determines the required level of generalisation and future-proofness for implementation of specific feature?

My domain of application is accounting and business software (backoffice).

Navigation abstraction for JavaFX desktop application

I am trying to abstract some functionality from my desktop application (JavaFX) for changing views. So, what I am thinking is:

Navigator interface with methods like goToAccountsOverview(), goToAccountDetails(Account account) etc. The implementation will depend on a ViewFactory to create the Views and a DisplayingViewChanger to change the view that is being displayed.

There will be multiple navigator interfaces depending on the state of the application, starting with:

  • NotConnectedStateNavigator (goToConnectToDatabase(), goToCreateDatabase() etc)
  • ConnectedStateNavigator (goToAccountsOverview(), goToAccountDetails(Account account) etc)

So each state will have its own navigator and view factory and a common view changer.

The view factories and navigators will not share a common interface (createView(ViewEnum v) and goToView(View view) respectively) because I cannot think of a way to pass parameters (for example for creating the account details view, how would I pass the account model?). I could do it by passing a map of parameters but it seems hacky.

Does this sound ok?

Also, DisplayingViewChanger doesn’t sound like a good name to me but I cant think of anything else. Maybe SceneChanger? Any suggestions?

Moving to a field of low abstraction

What are examples of mathematicians who were initially primarily working an area of (comparatively) high abstraction and then started working primarily in an area of (comparatively) low abstraction?

Here, the level of abstraction is defined as follows: take a paper of yours, choose the object of primary interest, give its definition, then give a definition of all the terms entering the definition, and so on and so on before you arrive at the “atomic” notions (which for most mathematicians will be sets). The number of iterations is the level of abstraction.

An anti-example is Barry Mazur, who started working in geometric topology and then moved to arithmetic geometry and some tech-intensive number theory.

Is λx. a valid Lamda Calculus abstraction?

For demonstration purposes I was wondering about some very easy to grasp LC abstractions and I came to the idea of a function that simply eats its argument, and nothing more.

If you apply λx. (Yes no lambda term after the point) to an argument the abstraction reduces to nothing.

Although this isn’t very useful for computation maybe, do you think the idea itself is valid or not?

First Program Tic-Tac-Toe. Trouble with abstraction?

This is the first little project I’ve made that didn’t feel it was complete gibberish. But I couldn’t tell.

The biggest problem I had with this was using the BoardValue enum working like I wanted to. I understand that classes should have a level of abstraction to them and I suspect that the way I implemented the at(int) returning a char over a BoardValue took away from that. However, I though having to convert the return from at(int) to a char if it returned a BoardValue would be redundant. For example, using a statement like this

char print_char = Board.at(some_index) == BoardValue::o ? 'O' : 'X'; 

I hope I’ve done a decent job describing my dilemma.

Overall, I’m hoping for some overall general code style tips and pointers on how to write better code from here.


#ifndef TICTACTOE #define TICTACTOE #include <array> #include <iostream>  enum BoardValue : char{ none = ' ', o = 'O', x = 'X' };  class Board { public:     Board()     {         for(auto begin = board.begin(),end = board.end();begin != end; ++begin)             *begin = BoardValue::none;     }      char at(int index) const{ return board.at(index); }     inline bool check_win(BoardValue) const;     bool place(int, BoardValue); private:     bool check_diagonals(BoardValue) const;     bool check_horizontals(BoardValue) const;     bool check_verticals(BoardValue) const;      std::array<char, 9> board{}; };  inline bool Board::check_win(BoardValue check) const {     if(check == BoardValue::none)         throw "Trying to check_win for check == BoardValue::none!";     return check_diagonals(check) || check_horizontals(check) || check_verticals(check); }  #endif 


#include "tictactoe.h" #include <iostream>  //returns false if index is occupied bool Board::place(int index, BoardValue value) {     if(board.at(index) != BoardValue::none)         return false;     board.at(index) = value;     return true; }  bool Board::check_diagonals(BoardValue check) const {     //if middle is not check no diagnols will pass     if(board.at(4) != check)         return false;     //backward diagonal '\'     if(board.at(0) == check && board.at(4) == check)         return true;     //forward diaganol '/'     if(board.at(2) == check && board.at(6) == check)         return true;     return false; }  bool Board::check_horizontals(BoardValue check) const {     for(int row = 0; row < 3; ++row){         if(board.at(row) == check &&             board.at(row + 3) == check &&             board.at(row + 6) == check)             return true;     }     return false; }  bool Board::check_verticals(BoardValue check) const {     for(int col = 0; col < 3; ++col){         if(board.at(col * 3) == check &&             board.at(col * 3 + 1) == check &&             board.at(col * 3 + 2 ) == check)             return true;     }     return false; } 


#include "tictactoe.h" #include <iostream>  int ask_input(char player, bool retry = false) {     if(!retry)         std::cout << "It's " << player             << "'s turn. Where do you want to go(e.g. A1 B3 C2)? ";     else         std::cout << "No, no, no " << player             << "! Input a letter followed bt a number: ";     std::string input;     std::cin >> input;      if(input.size() < 2)         return ask_input(player, true);      int col_input{};     switch(*input.begin())     {         case 'A':         case 'a':             col_input = 0;             break;         case 'B':         case 'b':             col_input = 1;             break;         case 'C':         case 'c':             col_input = 2;             break;         default:             return ask_input(player, true);     }      int row_input = *(input.begin() + 1) - '0'; //convers char '1' to int 1     --row_input;      return col_input * 3 + row_input; }  BoardValue ask_turn() //ask whos first if return true O goes first {     BoardValue turn;     std::string input;     std::cout << "Who goes first(X or O)? ";     for(bool valid_input{false}; !valid_input;)     {         std::cin >> input;         switch(input.front()) //input cannot be null at this point         {             case 'x':             case 'X':                 valid_input = true;                 turn = BoardValue::x;                 break;             case '0':             case 'o':             case 'O':                 valid_input = true;                 turn = BoardValue::x;                 break;             default:                 std::cout << "Invalid input! Try X or O :";         }     }     return turn; }  std::ostream &print_board(std::ostream &os,const Board &board) {     os << " |A|B|C\n";     for(int row = 0; row < 3; ++row)     {         os << std::string( 8, '-') << '\n';         os << row + 1 << '|';         for(int col = 0; col < 3; ++col)         {             char follow_char{ col == 2 ? '\n' : '|' };             os << board.at(col * 3 + row) << follow_char;         }     }     os << std::endl;     return os; }  int main(){     Board board{};     BoardValue turn{ ask_turn() };      //turn will be set back to appropriate value at start of game loop     turn = turn == BoardValue::o  ? BoardValue::x : BoardValue::o;     int turn_count{0};     while(board.check_win(turn) == false)     {         turn = turn == BoardValue::o  ? BoardValue::x : BoardValue::o;         print_board(std::cout, board);         bool input_valid{false};         while(input_valid == false)         {             int input;             input = ask_input(turn);             input_valid = board.place(input, turn);             if( input_valid == false )                 std::cout << "That place is take! Try again..\n";         }         if(++turn_count == 9) //max amount of turns game is tie             break;     }     print_board(std::cout, board);     if(turn_count == 9)//game is tie         std::cout << "Looks like its a tie...\n";     else         std::cout << (char)turn << " wins!\n"; } 

Is there a way to get Burning Wheel Revised’s Abstraction and Distillation mechanics to be compatible with Burning Wheel Gold?

In the change between Burning Wheel Revised and Burning Wheel Gold, casting spells no longer uses Sorcery + Will, and instead just uses Sorcery. Spellweaver was stripped out, which presents a problem when it comes to utilizing the Magic Burner properly.

By and large, the Magic Burner, a companion to BW Revised is compatible with BW Gold – however, as a result of the changed obstacles for sorcerous castings, Abstraction and Distillation is no longer compatible. The example they give from the Magic Burner is as follows:

I want to create a spell that sends a blast of leaves and dirt into my enemy’s face, distracting him.

My leaf distracting spell would be Earth, Tax, Presence Origin, Instantaneous Duration, Single Target. … It’s an Ob 5 spell, and takes 12 actions.

(I’ve omitted the derivation because the book’s text is not public.)

In Burning Wheel Revised, this would have been moderately difficult. Someone may have +4 Sorcery and +4 Will, giving them +8 for Ob 5. Not easy, but possible to accomplish – their average roll would be a 4.8.

However, in Burning Wheel Gold, they would just be rolling their +4 Sorcery for an Ob 5 casting, which borders on impossible, even when executed Patiently and Carefully – their average roll is a 2.4.

I’d like to include Abstraction and Distillation in my BWG games. However, it’s very obvious that it’s not directly compatible. I have no clue how to balance it, however.

Is there a way to do this without introducing serious imbalance issues?