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 6837793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:31:10+00:00 2026-05-26T23:31:10+00:00

I remember somewhere seeing such a notation for formally defining a variable: variable_name: type

  • 0

I remember somewhere seeing such a notation for formally defining a variable:

variable_name: type

And similarly:

function_name(....): return_type

But I don’t remember and I can’t find the formal definition of this syntax.

My question first is, is this really a formal syntax or did somebody just make it up? My second question, can you give me the name for it, or a reference?

I am asking because I was wondering how the function arguments are defined. Would it be like this?

function(arg1:type1, arg2:type2): type

If so, how are default values shown?

  • 1 1 Answer
  • 0 Views
  • 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. Editorial Team
    Editorial Team
    2026-05-26T23:31:11+00:00Added an answer on May 26, 2026 at 11:31 pm

    The syntax you describe is used in the ML family of programming languages. In Standard ML, which has a formal semantics, there are no default values, everything must be initialized when declared.

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

Sidebar

Related Questions

This may have been hidden somewhere in the docs, but I don't remember seeing
I seem to remember seeing this somewhere, but for the life of me search
I remember seeing the following functionality somewhere on the web, but I can't seem
I remember seeing how to do this somewhere, but I'm totally drawing a blank
I remember seeing somewhere that you could call python methods from inside C using
I remember seeing somewhere there ^ operator is used as a pointer operator in
I remember seeing a debate about this somewhere, and am currently considering removing a
I remember seeing the code for a Highpass filter a few days back somewhere
I've seen somewhere but can not remember. How to get a SQL string from
I remember reading somewhere but I cannot remember where exactly I need to write

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.