Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 79805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:12:12+00:00 2026-05-10T21:12:12+00:00

The comments on Steve Yegge ‘s post about server-side Javascript started discussing the merits

  • 0

The comments on Steve Yegge‘s post about server-side Javascript started discussing the merits of type systems in languages and this comment describes:

… examples from H-M style systems where you can get things like:

expected signature Int*Int->Int but got Int*Int->Int 

Can you give an example of a function definition (or two?) and a function call that would produce that error? That looks like it might be quite hard to debug in a large-ish program.

Also, might I have seen a similar error in Miranda? (I have not used it in 15 years and so my memory of it is vague)

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T21:12:12+00:00Added an answer on May 10, 2026 at 9:12 pm

    I’d take Yegge’s (and Ola Bini’s) opinions on static typing with a grain of salt. If you appreciate what static typing gives you, you’ll learn how the type system of the programming language you choose works.

    IIRC, ML uses the ‘*’ syntax for tuples. <type> * <type> is a tuple type with two elements. So, (1, 2) would have int * int type.

    Both Haskell and ML use -> for functions. In ML, int * int -> int would be the type of a function that takes a tuple of int and int and maps it to an int.

    One of the reasons you might see an error that looks vaguely like the one Ola quoted when coming to ML from a different language, is if you try and pass arguments using parentheses and commas, like one would in C or Pascal, to a function that takes two parameters.

    The trouble is, functional languages generally model functions of more than one parameter as functions returning functions; all functions only take a single argument. If the function should take two arguments, it instead takes an argument and returns a function of a single argument, which returns the final result, and so on. To make all this legible, function application is done simply by conjunction (i.e. placing the expressions beside one another).

    So, a simple function in ML (note: I’m using F# as my ML) might look a bit like:

    let f x y = x + y;; 

    It has type:

    val f : int -> int -> int 

    (A function taking an integer and returning a function which itself takes an integer and returns an integer.)

    However, if you naively call it with a tuple:

    f(1, 2) 

    … you’ll get an error, because you passed an int*int to something expecting an int.

    I expect that this is the ‘problem’ Ola was trying to cast aspersions at. I don’t think the problem is as bad as he thinks, though; certainly, it’s far worse in C++ templates.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 175k
  • Answers 175k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I assume you are trying to make cartoon style edges… May 12, 2026 at 3:07 pm
  • Editorial Team
    Editorial Team added an answer The general approach looks good and actually probably a little… May 12, 2026 at 3:07 pm
  • Editorial Team
    Editorial Team added an answer You will get warning if you don't use a code… May 12, 2026 at 3:07 pm

Related Questions

The comments on Steve Yegge 's post about server-side Javascript started discussing the merits
I am tying to make comments in a blog engine XSS-safe. Tried a lot
I'm building a project that loads data from a webservice into a TreeView Control.
Suppose I have a method public Patient(int id) { ---- } that returns Patient
I was sure that it hasn't, but looking for a definite answer on the

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.